dag

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package dag computes topology metrics for job DAGs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UniqueImages

func UniqueImages(def *jobdef.Definition) []string

UniqueImages returns the deduplicated set of container images in definition order.

Types

type Analysis

type Analysis struct {
	Steps          []StepInfo
	ExecutionOrder [][]string // layers of parallelizable steps
	MaxParallelism int
	RootSteps      []string // steps with no predecessors
	LeafSteps      []string // steps with no successors
}

Analysis holds the computed topology of a job definition.

func Analyze

func Analyze(def *jobdef.Definition) (*Analysis, error)

Analyze computes topology metrics for the given definition. The definition must already be validated.

type StepInfo

type StepInfo struct {
	Name       string
	Engine     string
	Image      string
	DependsOn  []string
	Successors []string
	Depth      int // topological depth (layer index)
}

StepInfo describes a single step in the DAG.

Jump to

Keyboard shortcuts

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