Documentation ¶
Index ¶
- Constants
- type Job
- type Scheduler
- func (scheduler *Scheduler) AddFunction(function interface{}, functionId string)
- func (scheduler *Scheduler) AddJobById(functionId string, execTime time.Time, repetitive bool, ...) error
- func (scheduler *Scheduler) CleanJobs()
- func (scheduler *Scheduler) DeleteJob(jobId string)
- func (scheduler Scheduler) GetJobsFromBolt() error
- func (scheduler *Scheduler) Job(functionId string, jobId string) *Job
- func (scheduler *Scheduler) Start() chan bool
Constants ¶
View Source
const BUCKET_NOT_EXIST = "bucket does not exist"
View Source
const NO_JOBS_IN_DB = "There are no jobs in database"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct { FunctionId string Arguments []interface{} ExecTime time.Time Repetitive bool RepeatTime time.Duration HasLifetime bool Lifetime time.Time }
Job Structure.
func (*Job) ExecutionTime ¶
Set execution time of the Job.
type Scheduler ¶
type Scheduler struct { MaxCon int // contains filtered or unexported fields }
Scheduler structure.
func (*Scheduler) AddFunction ¶
Add functions to scheduler.
func (*Scheduler) AddJobById ¶
func (scheduler *Scheduler) AddJobById(functionId string, execTime time.Time, repetitive bool, repeatTime time.Duration, args ...interface{}) error
Add Job to scheduler.
func (*Scheduler) CleanJobs ¶
func (scheduler *Scheduler) CleanJobs()
Remove all jobs of the scheduler.
func (Scheduler) GetJobsFromBolt ¶
Click to show internal directories.
Click to hide internal directories.