cronworker

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CronManager

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

func NewCronManager

func NewCronManager() *CronManager

func (*CronManager) AddWorker

func (mag *CronManager) AddWorker(w CronWorker)

func (*CronManager) Cron

func (mag *CronManager) Cron() *cron.Cron

func (*CronManager) Start

func (mag *CronManager) Start()

func (*CronManager) Stop

func (mag *CronManager) Stop()

type CronWorker

type CronWorker interface {
	Cron() string
	Run()
}

func NewCronWorker

func NewCronWorker(cron string, f func()) CronWorker

Jump to

Keyboard shortcuts

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