scheduler

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Duration       = "duration"
	RandomDuration = "random-duration"
	Daily          = "daily"
	Weekly         = "weekly"
	Monthly        = "monthly"

	Monday    = "monday"
	Tuesday   = "tuesday"
	Wednesday = "wednesday"
	Thursday  = "thursday"
	Friday    = "friday"
	Saturday  = "saturday"
	Sunday    = "sunday"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct{}

type Interface

type Interface interface {
	Start(ctx context.Context)
	Shutdown(ctx context.Context)
	Register(ctx context.Context, opt JobOption, handlerFunc any) error
}

func New

func New(cfg Config, log logger.Interface) Interface

type JobOption

type JobOption struct {
	JobType     string
	Duration    time.Duration
	Jitter      time.Duration
	RunningDate int
	RunningDay  time.Weekday
	RunningTime time.Time
}

Jump to

Keyboard shortcuts

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