Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broadcaster ¶
type Broadcaster interface { // Register a new channel to receive broadcasts from a pubsubtopic Register(topic *string, newch chan<- *protocol.Envelope) // Register a new channel to receive broadcasts from a pubsub topic and return a channel to wait until this operation is complete WaitRegister(topic *string, newch chan<- *protocol.Envelope) doneCh // Unregister a channel so that it no longer receives broadcasts from a pubsub topic Unregister(topic *string, newch chan<- *protocol.Envelope) // Unregister a subscriptor channel and return a channel to wait until this operation is done WaitUnregister(topic *string, newch chan<- *protocol.Envelope) doneCh // Shut this broadcaster down. Close() // Submit a new object to all subscribers Submit(*protocol.Envelope) }
The Broadcaster interface describes the main entry points to broadcasters.
func NewBroadcaster ¶
func NewBroadcaster(buflen int) Broadcaster
NewBroadcaster creates a Broadcaster with an specified length It's used to register subscriptors that will need to receive an Envelope containing a WakuMessage
Click to show internal directories.
Click to hide internal directories.