Help us shape the future of Go! Take the 2026 Go Developer Survey

scheduler

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 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 Registry

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

Registry is the process-wide lookup table of DAG schedulers.

Every orchestrator implementation exposes a stable Name() which is persisted in analysis.scheduler_mode. Submitting a run, stopping it and crash recovery all resolve the owning scheduler through this single table, so the three code paths can never disagree about who advances an analysis.

The pattern mirrors internal/container_runtime/factory.go: implementations are registered once at startup and looked up by name afterwards. Adding a scheduler is a register call here plus a NormalizeSchedulerMode entry in internal/types.

func NewRegistry

func NewRegistry() *Registry

NewRegistry returns an empty registry.

func (*Registry) Get

Get returns the orchestrator registered for name, or nil when none matches.

func (*Registry) Has

func (r *Registry) Has(name string) bool

Has reports whether an orchestrator is registered for name.

func (*Registry) List

func (r *Registry) List() []interfaces.DagOrchestrator

List returns the registered orchestrators in registration order.

func (*Registry) Names

func (r *Registry) Names() []string

Names returns the registered scheduler names in registration order.

func (*Registry) Register

func (r *Registry) Register(o interfaces.DagOrchestrator)

Register stores an orchestrator under the name it reports.

func (*Registry) RegisterName

func (r *Registry) RegisterName(name string, o interfaces.DagOrchestrator)

RegisterName stores an orchestrator under an explicit name. The name is normalized so both the canonical value ("dynamic") and a legacy value ("dynamic_v2") resolve to the same entry.

func (*Registry) Resolve

func (r *Registry) Resolve(mode string) interfaces.DagOrchestrator

Resolve returns the orchestrator that owns an analysis whose persisted scheduler_mode is mode. Empty and unknown values fall back to the default scheduler through types.NormalizeSchedulerMode.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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