ticker

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyJobs = errors.New("empty jobs")
)

Functions

This section is empty.

Types

type CronTicker

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

func NewCronTicker

func NewCronTicker(opts ...CronTickerOption) *CronTicker

func (*CronTicker) AddJob

func (ct *CronTicker) AddJob(t string, job models.Job) error

func (*CronTicker) Start

func (ct *CronTicker) Start(ctx context.Context) error

func (*CronTicker) Stop

func (ct *CronTicker) Stop(_ context.Context) error

type CronTickerOption

type CronTickerOption func(ct *CronTicker)

func WithJobsCronTickerOpt

func WithJobsCronTickerOpt(jobs ...*JobCronTicker) CronTickerOption

type JobCronTicker

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

type JobTimeTicker

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

type TimeTicker

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

func NewTimeTicker

func NewTimeTicker(opts ...TimeTickerOption) *TimeTicker

func (*TimeTicker) AddJob

func (tt *TimeTicker) AddJob(t string, job models.Job) error

func (*TimeTicker) Start

func (tt *TimeTicker) Start(ctx context.Context) error

func (*TimeTicker) Stop

func (tt *TimeTicker) Stop(_ context.Context) error

type TimeTickerOption

type TimeTickerOption func(tt *TimeTicker)

func WithJobsTimeTickerOpt

func WithJobsTimeTickerOpt(jobs ...*JobTimeTicker) TimeTickerOption

Jump to

Keyboard shortcuts

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