Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SignalBroadcaster ¶
type SignalBroadcaster struct {
// contains filtered or unexported fields
}
func NewSignalBroadcaster ¶
func NewSignalBroadcaster() *SignalBroadcaster
func (*SignalBroadcaster) AddListener ¶
func (b *SignalBroadcaster) AddListener(c chan<- struct{})
AddListener adds channel c to listeners, which will be written to once BroadcastNonblock is invoked.
func (*SignalBroadcaster) BroadcastNonblock ¶
func (b *SignalBroadcaster) BroadcastNonblock()
BroadcastNonblock writes to all listeners in a non-blocking manner. BroadcastNonblock ignores unresponsive listeners.
func (*SignalBroadcaster) Len ¶ added in v0.3.5
func (b *SignalBroadcaster) Len() int
Len returns the number of listeners.
func (*SignalBroadcaster) RemoveListener ¶
func (b *SignalBroadcaster) RemoveListener(c chan<- struct{})
RemoveListener removes channel c from the listeners.
Click to show internal directories.
Click to hide internal directories.