schedule

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2015 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConstantSchedule

type ConstantSchedule struct {
	Interval time.Duration
}

func Every

func Every(duration time.Duration) ConstantSchedule

func (ConstantSchedule) Next

func (c ConstantSchedule) Next(current time.Time) time.Time

type CronSchedule

type CronSchedule struct {
	Expression *cronexpr.Expression
}

func Cron

func Cron(expression string) CronSchedule

func (CronSchedule) Next

func (c CronSchedule) Next(current time.Time) time.Time

type RandomInterval

type RandomInterval struct {
	Interval   time.Duration
	Randomness float64
}

func EveryRandom

func EveryRandom(interval time.Duration, plusOrMinus float64) RandomInterval

func (RandomInterval) Next

func (r RandomInterval) Next(now time.Time) time.Time

func (RandomInterval) RandomRange

func (r RandomInterval) RandomRange() (min, max float64)

Jump to

Keyboard shortcuts

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