Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Listener ¶
type Listener interface { // Listen defines the method a Listener should implement to notify addition or removal // in the list of elements // Implementation should always post the whole new list of elements Listen(chan []string) }
Listener defines methods an object must implement to be used as a listener
type PollListener ¶
type PollListener struct { // Ticker is the channel controlling the polling interval (typically fed by time.NewTicker(1 * time.Second)) Ticker <-chan time.Time // Logger is the logger in which errors and log messages will be printed Logger logger.Logger // Poll is the function called to get the new state Poll Poll }
PollListener a poller context
func (*PollListener) Listen ¶
func (p *PollListener) Listen(out chan []string)
Listen implements the Listener interface and forwards all chandes to out
Click to show internal directories.
Click to hide internal directories.