scheduler

package
v0.0.0-...-9228ce8 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Elector

type Elector interface {
	IsLeader() bool
}

type Periodic

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

func NewScheduler

func NewScheduler(elector Elector) *Periodic

func (*Periodic) Close

func (s *Periodic) Close() error

func (*Periodic) Open

func (s *Periodic) Open(ctx context.Context) error

func (*Periodic) ScheduleEvery

func (s *Periodic) ScheduleEvery(interval time.Duration, name string, fn func(ctx context.Context) error)

Jump to

Keyboard shortcuts

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