ops

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cron

type Cron struct {
	// contains filtered or unexported fields
}

Cron send an specifi message at scheduled intervals

func NewCron

func NewCron(opts CronOptions) *Cron

NewCron create a new Cron Worker with given options

func (*Cron) Process

func (c *Cron) Process(ctx context.Context, args selina.ProcessArgs) error

Process add a job scec, any message received will be discarded when input is closed this worker return nil

type CronOptions

type CronOptions struct {
	//Spec use same format as github.com/robfig/cron/v3
	//Second Minute Hour DayOfMonth Month DayOfWeek
	Spec string
	//Which message will be sent every schedule
	Message []byte
}

CronOptions customize cron behaviour

func (CronOptions) Check added in v0.8.0

func (o CronOptions) Check() error

Check if a combination of options is valid

Jump to

Keyboard shortcuts

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