Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RegisteredHost ¶
RegisteredHost holds the state of a registered host
func (RegisteredHost) IsAlive ¶
func (rc RegisteredHost) IsAlive() bool
IsAlive reports if the host is up or down. If the host has been unavailable 5 times in a row, it's considered "down". One successful request marks it as "up" again
func (*RegisteredHost) UpdateStatus ¶
func (rc *RegisteredHost) UpdateStatus(alive bool)
UpdateStatus updates the status of the host
type Scheduler ¶
Scheduler records the list of hosts and calculates the next host(s) whose LED should be switched on
func New ¶
func New(cfg configuration.SchedulerConfiguration) (*Scheduler, error)
New creates a Scheduler based on the provided pattern name
func (*Scheduler) GetHosts ¶
func (s *Scheduler) GetHosts() (hosts []RegisteredHost)
GetHosts returns all registered hosts (regardless of their state)
func (*Scheduler) UpdateStatus ¶
UpdateStatus updates the status (up/down) of the provided host
Click to show internal directories.
Click to hide internal directories.