Documentation
¶
Index ¶
Constants ¶
View Source
const START = "start"
Variables ¶
View Source
var DEFAULT = func() bool { return true }
Functions ¶
func GetMethodName ¶
GetMethodName returns the name of the function, stripping any suffixes this is used to derive node names from function names
Types ¶
type Graph ¶
type Graph struct {
Nodes map[string]*Node
CurrentNode string
// Hooks for before and after node and edge execution
// These can be set to custom functions for logging or other purposes
HookBeforeStep func(stepName string)
HookAfterStep func(stepName string)
HookBeforeTransition func(fromStep string, toStep string, description string)
}
func (*Graph) RunGraph ¶
func (r *Graph) RunGraph()
RunGraph executes the graph starting from the current node
func (*Graph) SetStepToRun ¶
SetStepToRun Override the next node in the graph
Click to show internal directories.
Click to hide internal directories.