Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CronJob ¶
type CronJob interface { Job() captain.Worker LockProvider() captain.LockProvider ResultProcessor() captain.ResultProcessor RuntimeProcessor() captain.RuntimeProcessor ShouldRun(key string) bool }
CronJob any cron must satisfy this permission to run
type TestWorker ¶
type TestWorker struct{}
TestWorker a sample worker
func (TestWorker) Job ¶
func (job TestWorker) Job() captain.Worker
Job actual task to be performed by worker
func (TestWorker) LockProvider ¶
func (job TestWorker) LockProvider() captain.LockProvider
LockProvider no lock provider implementation for now
func (TestWorker) ResultProcessor ¶
func (job TestWorker) ResultProcessor() captain.ResultProcessor
ResultProcessor act on result
func (TestWorker) RuntimeProcessor ¶
func (job TestWorker) RuntimeProcessor() captain.RuntimeProcessor
RuntimeProcessor monitors worker every tick
func (TestWorker) ShouldRun ¶
func (job TestWorker) ShouldRun(key string) bool
ShouldRun returns weather or not this worker should run given a particular key
Click to show internal directories.
Click to hide internal directories.