Documentation
¶
Index ¶
Constants ¶
View Source
const (
MsgHoldDuration = time.Second * 10
)
Variables ¶
View Source
var DefaultCachedPubSub = NewRegistry()
Functions ¶
Types ¶
type Broadcaster ¶
type Broadcaster struct {
// contains filtered or unexported fields
}
func NewBroadcaster ¶
func NewBroadcaster() *Broadcaster
func (*Broadcaster) Broadcast ¶
func (b *Broadcaster) Broadcast(msg Message)
func (*Broadcaster) GetListener ¶
func (b *Broadcaster) GetListener() *Listener
GetListener Message subscribers obtain message listener from the broadcaster to receive broadcasts. The listener is similar to a radio.
type CachedPubSub ¶
type CachedPubSub struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *CachedPubSub
func (*CachedPubSub) Publish ¶
func (r *CachedPubSub) Publish(topicName string, msg Message)
Click to show internal directories.
Click to hide internal directories.