pubsub

package
v0.0.0-...-5546168 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IncomingMessage

type IncomingMessage struct {
	// contains filtered or unexported fields
}

func (*IncomingMessage) Channel

func (m *IncomingMessage) Channel() (string, bool)

func (*IncomingMessage) Kind

func (m *IncomingMessage) Kind() MessageKind

func (*IncomingMessage) NumChannels

func (m *IncomingMessage) NumChannels() (int64, bool)

func (*IncomingMessage) Pattern

func (m *IncomingMessage) Pattern() (string, bool)

func (*IncomingMessage) Payload

func (m *IncomingMessage) Payload() (string, bool)

func (*IncomingMessage) UnmarshalRESP

func (m *IncomingMessage) UnmarshalRESP(value resp.Value) error

type MessageKind

type MessageKind string
const (
	KindSubscribe    MessageKind = "subscribe"
	KindSubscribeP   MessageKind = "psubscribe"
	KindUnsubscribe  MessageKind = "unsubscribe"
	KindUnsubscribeP MessageKind = "punsubscribe"
	KindMessage      MessageKind = "message"
	KindPong         MessageKind = "pong"
)

type Subscription

type Subscription struct {
	Channel string
	Pattern bool
}

type Subscriptions

type Subscriptions struct {
	// contains filtered or unexported fields
}

func (*Subscriptions) Active

func (s *Subscriptions) Active() (channels, patterns []string)

func (*Subscriptions) Subscribe

func (s *Subscriptions) Subscribe(ch string, pattern bool)

func (*Subscriptions) Unsubscribe

func (s *Subscriptions) Unsubscribe(ch string, pattern bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL