Documentation ¶
Overview ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broadcaster ¶
type Broadcaster struct {
// contains filtered or unexported fields
}
Broadcaster implements a broadcast channel. The zero value is a usable unbuffered channel.
func NewBroadcaster ¶
func NewBroadcaster(n int) *Broadcaster
NewBroadcaster returns a new Broadcaster with the given capacity (0 means unbuffered).
func (*Broadcaster) Close ¶
func (b *Broadcaster) Close()
Close closes the channel, disabling the sending of further messages.
func (*Broadcaster) Listen ¶
func (b *Broadcaster) Listen() *Listener
Listen returns a Listener for the broadcast channel.
func (*Broadcaster) Send ¶
func (b *Broadcaster) Send(v interface{})
Send broadcasts a message to the channel.
Click to show internal directories.
Click to hide internal directories.