graph

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectCycle

func DetectCycle(g *Graph) error

DetectCycle 检查环

func TopoSort

func TopoSort(g *Graph) ([]string, error)

TopoSort 拓普排序

Types

type Graph

type Graph struct {
	Nodes map[string]*definition.NodeDefinition

	Parents  map[string][]string
	Children map[string][]string

	Edges map[string][]definition.EdgeDefinition
}

Graph DAG 的基础结构

func Build

func Build(def *definition.WorkflowDefinition) (*Graph, error)

Jump to

Keyboard shortcuts

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