Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmptyJobKey = errors.New("empty job key") ErrEmptyJobType = errors.New("empty job type") )
View Source
var (
ErrInvalidCronSpec = "invalid cron spec: %v"
)
View Source
var (
ErrPastTime = errors.New("time before now")
)
Functions ¶
This section is empty.
Types ¶
type BaseJob ¶
func NewBaseJob ¶
type CronJob ¶
type CronJob struct { BaseJob Data interface{} CronSpec string // contains filtered or unexported fields }
func NewCronJob ¶
data is optional and may be nil
func (*CronJob) NextTriggerTime ¶
type OneTimeJob ¶
func NewOneTimeJob ¶
func NewOneTimeJob(jType, key string, triggerTime time.Time, data interface{}) (*OneTimeJob, error)
data is optional and may be nil
func (*OneTimeJob) Marshal ¶
func (j *OneTimeJob) Marshal() ([]byte, error)
func (*OneTimeJob) NextTriggerTime ¶
func (j *OneTimeJob) NextTriggerTime() time.Time
func (*OneTimeJob) PostExecution ¶
func (j *OneTimeJob) PostExecution(_ time.Time, err error)
func (*OneTimeJob) Unmarshal ¶
func (j *OneTimeJob) Unmarshal(b []byte) error
type Unmarshaler ¶
Unmarshaler is the interface implemented by types that can unmarshal a byte description of themselves.
Click to show internal directories.
Click to hide internal directories.