Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExponentialBackoff ¶
ExponentialBackoff transforms a time.Duration to the next time.Duration using exponential backoff.
Types ¶
type Config ¶
type Config struct { // Service is an instance of the service. Service Service // StartDelay is the delay before starting the service. StartDelay time.Duration // RunInterval is the interval between runs. RunInterval time.Duration // RunIntervalFunc is a function that returns the interval between runs. It takes precedence // over RunInterval. RunIntervalFunc func() time.Duration // Enabled is a function that returns whether or not the service is currently enabled. Enabled func() bool // InitialRestartInterval is the initial restart interval. InitialRestartInterval time.Duration // NextRestartInterval is a function that receives the last restart interval and returns the // next one. NextRestartInterval func(time.Duration) time.Duration // Quiet indicates whether service start and finish should be logged. Quiet bool }
Directories ¶
Path | Synopsis |
---|---|
Package notifier batches up and sends out pending notifications.
|
Package notifier batches up and sends out pending notifications. |
Package watcher watches for devices whose state has changed.
|
Package watcher watches for devices whose state has changed. |
Click to show internal directories.
Click to hide internal directories.