scheduler

package
v0.0.0-...-6503209 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PeriodicEvent

type PeriodicEvent interface {
	Tick(context.Context)
	Interval() time.Duration
}

A PeriodicEvent is a repeatable event with a fixed interval.

type Scheduler

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

A Scheduler runs periodic events.

func New

func New() *Scheduler

func (*Scheduler) Add

func (s *Scheduler) Add(event PeriodicEvent)

func (*Scheduler) Run

func (s *Scheduler) Run(ctx context.Context)

Jump to

Keyboard shortcuts

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