Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnectionFactory ¶
ConnectionFactory is a function which creates a new redis.Conn. Since a connection can't be used once it is in subscription mode, this pattern has been introduced to create a new connection for every subscription and give an opportunity to do authentication.
type Subscription ¶
type Subscription struct { Messages <-chan string // contains filtered or unexported fields }
Subscription is a subscription to a topic. All messages will be pushed to the Messages channel. Close the close-cha
func Subscribe ¶
func Subscribe(f ConnectionFactory, topic string) Subscription
Subscribe creates a new subscription to the given topic.
func (*Subscription) Close ¶
func (s *Subscription) Close()
Close unsubscribes from the topic and closes the connection.
Click to show internal directories.
Click to hide internal directories.