workers

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyWorker = errors.New("worker name must be unique")
	ErrWrongOptions  = errors.New("wrong options")
)

Functions

func New

func New(opts Options) (err error)

func Start

func Start()

func Stop

func Stop()

func Wait

func Wait()

Types

type Options

type Options struct {
	Name     string
	Schedule Schedule
	Handler  func()
}

type Schedule

type Schedule interface {
	cron.Schedule
}

func Every

func Every(duration time.Duration) Schedule

func Parse

func Parse(spec string) (Schedule, error)

Jump to

Keyboard shortcuts

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