scheduler

package
v1.34.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 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 ScheduledTask

type ScheduledTask struct {
	Name      string        `json:"name"`
	Interval  time.Duration `json:"interval"`
	Recurring bool          `json:"recurring"`
	// contains filtered or unexported fields
}

func CreateRecurringTask

func CreateRecurringTask(name string, function TaskFunc, interval time.Duration) *ScheduledTask

func CreateTask

func CreateTask(name string, function TaskFunc, timeToExecution time.Duration) *ScheduledTask

WARNING: Tasks will run on every cluster node, so use this carefully.

func (*ScheduledTask) Cancel

func (task *ScheduledTask) Cancel()

func (*ScheduledTask) String

func (task *ScheduledTask) String() string

type TaskFunc

type TaskFunc func()

Jump to

Keyboard shortcuts

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