internal

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 24 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunSubgraph

func RunSubgraph(ctx context.Context, cancel context.CancelFunc, port int, openBrowser bool, logger *log.Logger, wf *types.Workflow, taskNames []string, tasksToSkip []string) error

func StartServer

func StartServer(ctx context.Context, port int, wg *sync.WaitGroup, dag DAG[*TaskNode], events chan *TaskNode)

Types

type DAG

type DAG[Node any] struct {
	// Name of the graph
	Name string `json:"name"`
	// Nodes in the graph
	Nodes map[string]Node `json:"nodes"`
	// edges in the graph
	Children map[string][]string `json:"children"`
	// parents of each node
	Parents map[string][]string `json:"parents"`
}

func NewDAG

func NewDAG[Node any](name string) DAG[Node]

func (*DAG[Node]) AddEdge

func (d *DAG[Node]) AddEdge(from, to string)

add an edge to the graph

func (*DAG[Node]) AddNode

func (d *DAG[Node]) AddNode(name string, node Node)

add a node to the graph

func (*DAG[Node]) Subgraph

func (d *DAG[Node]) Subgraph(nodeNames []string) map[string]bool

type TaskNode

type TaskNode struct {
	Name string     `json:"name"`
	Task types.Task `json:"task"`

	// Phase represents the current execution state of the task:
	// - "pending": Task is registered but waiting for dependencies to complete
	// - "waiting": Task's dependencies are satisfied and is ready to execute
	// - "starting": Task is initializing but not yet fully running
	// - "running": Task is actively executing
	// - "stalled": Task is running but not making progress
	// - "succeeded": Task completed successfully
	// - "failed": Task completed with errors
	// - "cancelled": Task was manually stopped
	// - "skipped": Task was intentionally not executed
	Phase string `json:"phase"`
	// the message for the task phase, e.g. "exit code 1'
	Message string `json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*TaskNode) MarshalJSON added in v1.2.0

func (n *TaskNode) MarshalJSON() ([]byte, error)

MarshalJSON takes the status lock so the phase/message/metrics fields are read consistently while task goroutines may be writing them.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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