scheduler

package
v0.53.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CronScheduler added in v0.52.0

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

CronScheduler is a wrapper around the cron library. It implements the IScheduler interface. It is used to schedule tasks at specific intervals. Wrapping the cron library is necessary to enable proper mocking while testing dependent code.

func NewCronScheduler added in v0.52.0

func NewCronScheduler() *CronScheduler

func (*CronScheduler) AddFunc added in v0.52.0

func (s *CronScheduler) AddFunc(interval string, cmd func()) error

func (*CronScheduler) Start added in v0.52.0

func (s *CronScheduler) Start()

func (*CronScheduler) Stop added in v0.52.0

func (s *CronScheduler) Stop()

type IScheduler

type IScheduler interface {
	Start()
	Stop()
	AddFunc(interval string, cmd func()) error
}

Jump to

Keyboard shortcuts

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