cron

package
v1.3.2-beta.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientCron

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

func NewClientCron

func NewClientCron() *ClientCron

func (*ClientCron) AddJob

func (a *ClientCron) AddJob(name string, spec time.Duration, fixTime string, handler CronHandler)

func (*ClientCron) Close

func (a *ClientCron) Close(shutdownTime time.Duration) error

func (*ClientCron) Start

func (a *ClientCron) Start(ctx context.Context) error

type CronHandler

type CronHandler func(context.Context) error

type CronRuntime

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

func NewCronRuntime

func NewCronRuntime(c *ClientCron, shutdownTime time.Duration, l zerolog.Logger) (*CronRuntime, error)

func (*CronRuntime) AddHandler

func (e *CronRuntime) AddHandler(name string, spec time.Duration, h CronHandler)

func (*CronRuntime) AddHandlerFixTime

func (e *CronRuntime) AddHandlerFixTime(name string, fixTime string, h CronHandler)

func (*CronRuntime) Run

func (e *CronRuntime) Run(ctx context.Context)

Jump to

Keyboard shortcuts

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