README ¶ Sentinel Heartbeats Cron Serf events Expand ▾ Collapse ▴ Documentation ¶ Index ¶ Constants Variables func Add(name string, creator Creator) type Clock func (c Clock) Schedule(name string, job_ Job) func (c Clock) Stop() type Creator type Job type Plugin Constants ¶ View Source const DEFAULT_INTERVAL string = "@every 1h" Variables ¶ View Source var Plugins = map[string]Creator{} Functions ¶ func Add ¶ func Add(name string, creator Creator) Types ¶ type Clock ¶ type Clock struct { Interval string // contains filtered or unexported fields } func (Clock) Schedule ¶ func (c Clock) Schedule(name string, job_ Job) func (Clock) Stop ¶ func (c Clock) Stop() type Creator ¶ type Creator func(map[string]string) (Plugin, error) NOTE map[string]interface{} for better type support after casting ? type Job ¶ type Job interface { //Run() error Run() } type Plugin ¶ type Plugin interface { Schedule(string, Job) Stop() } Plugin is the interface to implement report triggers. Those run in their own gorountines, registering sensor plugins and waiting for signals to execute them. Source Files ¶ View all Source files cron.go heartbeat.go Click to show internal directories. Click to hide internal directories.