schedule

package
v0.0.0-...-8562624 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RunnerJob

type RunnerJob struct {
	Next   time.Time
	Prev   time.Time
	Config *conf.Config
	// contains filtered or unexported fields
}

RunnerJob represents the job to run by cron

func ToJob

func ToJob(test *db.ApiTest, store *db.Store, conf *conf.Config) *RunnerJob

ToJob converts a test to a job

func (RunnerJob) Run

func (job RunnerJob) Run()

Run runs the cron job

type Scheduler

type Scheduler struct {
	Cron    *cron.Cron
	Jobs    []*RunnerJob
	Store   *db.Store
	Config  *conf.Config
	Entries map[string]cron.EntryID
}

Scheduler mantains the jobs and crons

func New

func New(tests []*db.ApiTest, store *db.Store, conf *conf.Config) *Scheduler

New creates a schedular

func (*Scheduler) Start

func (s *Scheduler) Start() error

Start starts the scheduler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL