UNSUBSCRIBE
Syntax
UNSUBSCRIBE [channel [channel ...]]
Module
pubsubCategories
pubsub connection slowDescription
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
- Go (Embedded)
- CLI
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")
Unsubscribe from all channels:
> UNSUBSCRIBE
Unsubscribe from specific channels:
> UNSUBSCRIBE channel1 channel2