Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier provides a one-to-many notification mechanism
func (*Notifier) Close ¶
func (n *Notifier) Close()
Close closes the notify and stops all receiver in this notifier Note we must `Close` the notifier if we can't ensure each receiver of this notifier is called `Stop` in order to prevent goroutine leak.
func (*Notifier) NewReceiver ¶
NewReceiver creates a receiver returns a channel to receive notifications and a function to close this receiver
Click to show internal directories.
Click to hide internal directories.