scheduler

package
v0.0.0-...-5b24d61 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPipeline

func NewPipeline(config conf.SchedulerConfig, database db.DB, monitor Monitor) api.Pipeline

Create a new pipeline with steps contained in the configuration.

Types

type Monitor

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

Collection of Prometheus metrics to monitor scheduler pipeline

func NewSchedulerMonitor

func NewSchedulerMonitor(registry *monitoring.Registry) Monitor

Create a new scheduler monitor and register the necessary Prometheus metrics.

type StepMonitor

type StepMonitor struct {
	// The wrapped scheduler step to monitor.
	Step plugins.Step
	// contains filtered or unexported fields
}

Wraps a scheduler step to monitor its execution.

func (*StepMonitor) GetName

func (s *StepMonitor) GetName() string

Get the name of the wrapped step.

func (*StepMonitor) Init

func (s *StepMonitor) Init(db db.DB, opts conf.RawOpts) error

Initialize the wrapped step with the database and options.

func (*StepMonitor) Run

func (s *StepMonitor) Run(request api.Request) (map[string]float64, error)

Run the step and observe its execution.

type StepValidator

type StepValidator struct {
	// The wrapped step to validate.
	Step plugins.Step
	// By default, we execute all validations. However, through the config,
	// we can also disable some validations if necessary.
	DisabledValidations disabledValidations
}

Wrapper for scheduler steps that validates them before/after execution.

func (*StepValidator) GetName

func (s *StepValidator) GetName() string

Get the name of the wrapped step.

func (*StepValidator) Init

func (s *StepValidator) Init(db db.DB, opts conf.RawOpts) error

Initialize the wrapped step with the database and options.

func (*StepValidator) Run

func (s *StepValidator) Run(request api.Request) (map[string]float64, error)

Run the step and validate what happens.

Directories

Path Synopsis
api
kvm

Jump to

Keyboard shortcuts

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