Skip to main content

UNSUBSCRIBE

Syntax

UNSUBSCRIBE [channel [channel ...]]

Module

pubsub

Categories

pubsub connection slow

Description

Unsubscribe from a list of channels. If the channel list is not provided, then the connection will be unsubscribed from all the channels that it's currently subscribed to.

Examples

Unsubscribe from all channels:

vault, err := echovault.NewEchoVault()
if err != nil {
log.Fatal(err)
}
vault.Unsubscribe()

Unsubscribe from specific channels:

vault, err := echovault.NewEchoVault()
if err != nil {
log.Fatal(err)
}
vault.Unsubscribe("channel1", "channel2")