schedule

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerEventTrigger

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

func NewDockerEventTrigger

func NewDockerEventTrigger(dockerCli *client.Client) *DockerEventTrigger

func (*DockerEventTrigger) Reset

func (d *DockerEventTrigger) Reset()

func (*DockerEventTrigger) Start

func (d *DockerEventTrigger) Start(ctx context.Context, eventChan chan<- TriggerEvent)

type IntervalTrigger

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

func NewIntervalTrigger

func NewIntervalTrigger(interval time.Duration) *IntervalTrigger

func (*IntervalTrigger) Reset

func (i *IntervalTrigger) Reset()

func (*IntervalTrigger) Start

func (i *IntervalTrigger) Start(ctx context.Context, eventChan chan<- TriggerEvent)

type Scheduler

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

func NewScheduler

func NewScheduler(task func()) *Scheduler

func (*Scheduler) Register

func (s *Scheduler) Register(trigger Trigger)

func (*Scheduler) Start

func (s *Scheduler) Start(ctx context.Context, debounceInterval time.Duration, maxDebounceDuration time.Duration, runAtStart bool)

type Trigger

type Trigger interface {
	Start(ctx context.Context, eventChan chan<- TriggerEvent)
	Reset()
}

type TriggerEvent

type TriggerEvent struct {
	Name string
}

Jump to

Keyboard shortcuts

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