scheduler

package
v3.0.0-rc67 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 39 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NodeActions = []string{
		"checks",
		"compliance_auto",
		"pusharray",
		"pushasset",
		"pushdisks",
		"pushpkg",
		"pushstats",
		"pushswitch",
		"sysreport",
	}

	// PlaceholderActions are the actions a schedule entry can carry that no om
	// command implements yet.
	//
	// The node configuration schedules one per backup section, as it does per
	// array and per switch section, and nothing pushes it yet. Naming it here
	// says the entry is known and unimplemented, rather than letting it fall
	// through as an action nobody has heard of, and wiring it later is a case
	// in CmdArgs and a move to NodeActions.
	//
	// It has no default schedule, so an entry only exists where a
	// configuration wrote one.
	PlaceholderActions = []string{
		"pushbackup",
	}
	ObjectActions = []string{
		"compliance_auto",
		"info",
		"resource_monitor",
		"run",
		"status",
		"update",
	}
)

NodeActions and ObjectActions list the schedule entry actions CmdArgs knows how to run, split by the scope of the om command each one runs.

Functions

func CmdArgs

func CmdArgs(e schedule.Entry) ([]string, error)

CmdArgs returns the om argv the scheduler runs for the entry.

These words are a contract with the om command tree, and nothing but that tree enforces it: an argv naming no command has om print a help text and exit 0, which the scheduler reports as a successful run. core/om's TestSchedulerCmdArgsResolve keeps this function and the tree in sync.

Types

type Schedules

type Schedules map[naming.Path]map[string]schedule.Entry

func (Schedules) Add

func (t Schedules) Add(path naming.Path, e schedule.Entry)

func (Schedules) Del

func (t Schedules) Del(path naming.Path, key string)

func (Schedules) DelPath

func (t Schedules) DelPath(path naming.Path)

func (Schedules) Get

func (t Schedules) Get(path naming.Path, k string) (schedule.Entry, bool)

func (Schedules) Table

func (t Schedules) Table(path naming.Path) (l schedule.Table)

type T

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

func New

func New(subQS pubsub.QueueSizer, opts ...funcopt.O) *T

func (*T) Start

func (t *T) Start(ctx context.Context) error

func (*T) Stop

func (t *T) Stop() error

Jump to

Keyboard shortcuts

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