runtime_cron

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewCron = runtime.ConstructorFor[*Cron, runtime.Runtime](
	func() *Cron {
		return &Cron{
			cron: cron.New(
				cron.WithLocation(time.UTC),
				cron.WithSeconds(),
			),
		}
	},
	func(hr *Cron) runtime.Runtime {
		return hr
	},
)

constructor

Functions

func WithCronJob

func WithCronJob[OK any, OV any, T any](
	schedule string,
	scheduler task.Scheduler[OK, OV, T],
	channel task.Channel[T],
) runtime.Configuration[*Cron]

func WithTaskProducer

func WithTaskProducer(taskProducer task.Producer) runtime.Configuration[*Cron]

Types

type Cron

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

implementation

func (*Cron) Start

func (c *Cron) Start() error

func (*Cron) Stop

func (c *Cron) Stop()

type Job

type Job[OK any, OV any, T any] struct {
	// contains filtered or unexported fields
}

func (*Job[OK, OV, T]) Run

func (j *Job[OK, OV, T]) Run()

Jump to

Keyboard shortcuts

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