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

planner

package
v1.12.8 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompositionInfo

type CompositionInfo struct {
	Type       string
	DefaultJob *model.JobSpec
}

CompositionInfo holds the default job for a composition

type JobGraph

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

JobGraph represents the DAG of job instances with cycle detection and topological sorting

func NewJobGraph

func NewJobGraph(jobs map[string]*model.JobInstance) *JobGraph

NewJobGraph creates a new job graph from job instances

func (*JobGraph) DetectCycles

func (g *JobGraph) DetectCycles() error

DetectCycles performs cycle detection on the job dependency graph using DFS

func (*JobGraph) TopologicalSort

func (g *JobGraph) TopologicalSort() ([]string, error)

TopologicalSort performs topological sorting of jobs using Kahn's algorithm Returns sorted job IDs in execution order

type JobPlanner

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

JobPlanner binds components to jobs and creates instances

func NewJobPlanner

func NewJobPlanner(compositions map[string]*CompositionInfo) *JobPlanner

NewJobPlanner creates a new job planner from a composition registry

func (*JobPlanner) PlanJobs

func (jp *JobPlanner) PlanJobs(instances map[string][]*model.ComponentInstance) (map[string]*model.JobInstance, error)

PlanJobs creates job instances from component instances

Jump to

Keyboard shortcuts

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