internal

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: MIT Imports: 23 Imported by: 0

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"`
	// metrics for resource usage tracking
	Metrics *types.Metrics `json:"metrics,omitempty"`
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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