Documentation ¶ Index ¶ type Client func NewClient(options Options) (Client, error) type Options type Type Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Client ¶ type Client interface { CreateTopic(topic string) error RemoveTopic(topic string) error Subscribe(topic string) (string, <-chan string, error) Unsubscribe(topic string, subscriptionId string) error Publish(topic string, data string) error Close() error } func NewClient ¶ func NewClient(options Options) (Client, error) type Options ¶ type Options struct { Type Type // to store max number of messages in channel if no subscriber is listening BufferLength int // Only for remote pubsub, to store redis client RedisClient *redis.Client TopicsChannelName string EventsChannelName string } type Type ¶ type Type string const ( Local Type = "local" Remote Type = "remote" ) Source Files ¶ View all Source files init.go local_pubsub.go remote_pubsub.go types.go Click to show internal directories. Click to hide internal directories.