Documentation
¶
Index ¶
- type Registry
- func (r *Registry) Get(name string) interfaces.DagOrchestrator
- func (r *Registry) Has(name string) bool
- func (r *Registry) List() []interfaces.DagOrchestrator
- func (r *Registry) Names() []string
- func (r *Registry) Register(o interfaces.DagOrchestrator)
- func (r *Registry) RegisterName(name string, o interfaces.DagOrchestrator)
- func (r *Registry) Resolve(mode string) interfaces.DagOrchestrator
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 (*Registry) Get ¶
func (r *Registry) Get(name string) interfaces.DagOrchestrator
Get returns the orchestrator registered for name, or nil when none matches.
func (*Registry) List ¶
func (r *Registry) List() []interfaces.DagOrchestrator
List returns the registered orchestrators 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.