Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Graph ¶
type Graph[K comparable, N any] struct { Nodes map[K]*Node[N] // contains filtered or unexported fields }
Graph is dependencies graph. K stands for map keys type (e.g. string names), N for data type.
func (*Graph[K, N]) AddDependency ¶
func (graph *Graph[K, N]) AddDependency(dependant, dependency K)
AddDependency adds lazy dependency. It will be evaluated only in `Build` method.
type GraphDependency ¶ added in v0.36.3
type GraphDependency[K comparable] [2]K
func (GraphDependency[K]) Dependant ¶ added in v0.36.3
func (dep GraphDependency[K]) Dependant() K
func (GraphDependency[K]) Dependency ¶ added in v0.36.3
func (dep GraphDependency[K]) Dependency() K
type Node ¶
type Node[N any] struct { Data N // contains filtered or unexported fields }
Node is graph node. N stands for data type.
func (*Node[N]) SetSucceeded ¶
func (node *Node[N]) SetSucceeded()
type NodeStatus ¶
type NodeStatus int
NodeStatus is used to code release status - success or failed. Please use ReleaseSuccess and ReleaseFailed constants.
const ( // NodePending is a NodeStatus for pending node. NodePending NodeStatus = iota // NodeSuccess is a NodeStatus for success node. NodeSuccess // NodeFailed is a NodeStatus for failed node. NodeFailed )
Click to show internal directories.
Click to hide internal directories.