Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue is a message queue with multiple channels, where every message is broadcast to all subscribers of a channel It will automatically close the channels for and remove subscribers whose context has ended, or buffer is full
func (*Queue) CreateChannel ¶
CreateChannel creates a new queue channel and returns a channel for broadcasting to it
func (*Queue) Subscribe ¶
Subscribe subscribes to a queue channel, and returns a channel for receiving messages Consumers should check whether the channel is closed, as the queue may terminate subscriptions at any time Returns an error if the given channel doesn't exist
func (*Queue) SubscriberCount ¶
SubscriberCount returns the total count of subscribers for all channels