Versions in this module Expand all Collapse all v1 v1.0.2 Sep 11, 2019 v1.0.1 Mar 1, 2019 Changes in this version + type FileChangeRoutine struct + OnFileChange func(file string, stat os.FileInfo, err error) + func NewFileChangeRoutine(f func() error, runInterval time.Duration, retryInterval time.Duration) *FileChangeRoutine + func (fcr *FileChangeRoutine) AddFiles(files ...string) + type HealthChecker struct + FastStart bool + NoRecover bool + OnDown func(numUps int, numDowns int, lastErr error) + OnUp func(numUps int, numDowns int) + func NewHealthChecker(runner Runner, defaultState bool, thresholdUp int, thresholdDown int) *HealthChecker + func (hrt *HealthChecker) IntervalRun() error + func (hrt *HealthChecker) IsUp() bool + func (hrt *HealthChecker) LastErr() error + func (hrt *HealthChecker) Reset(newState bool) + type IntervalRoutine struct + OnPanic func(recovered interface{}) + PanicRecoverDisabled bool + RetryBackoffDisabled bool + func NewIntervalRoutine(runner Runner, runInterval time.Duration, retryInterval time.Duration) *IntervalRoutine + func (rrt *IntervalRoutine) Start() + func (rrt *IntervalRoutine) Stop() + func (rrt *IntervalRoutine) TriggerRun() + type Runner interface + IntervalRun func() error + type RunnerFunc func() error + func (rf RunnerFunc) IntervalRun() error