Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultMaxDepth = 10
DefaultMaxDepth is the default maximum depth that statements can be nested in Glide workflows. It can be customised by setting 'MaxDepth' on the Compiler.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Compiler ¶
type Graph ¶
type InputMap ¶
InputMap is a map of flattened input keys to their corresponding values, e.g.
'group.id' -> 'test'
Used as the input for CEL evaluation, because CEL requires keys to be dot separated.
type Path ¶
Path is a group of statements. Each pass in a Glide program builds the workflow graph from Start nodes to End nodes.
type Program ¶
Program is a Glide workflow definition.
func NewProgram ¶
func NewProgram() *Program
func SimpleProgram ¶
SimpleProgram creates a program with one 'default' pass only.
type Result ¶
type Result struct {
// CG is the Completion Graph.
// The Completion Graph contains the same vertices as the policy graph,
// but only contains edges between nodes that are complete.
CG graph.Graph[string, step.Step]
// A map of vertex hashes to their corresponding state.
State map[string]State
// Outcome is the end state of the workflow.
// If empty, the workflow is considered in an indeterminate, ongoing state.
Outcome string
}
Result of a workflow execution
type VisitOpts ¶
type VisitOpts struct {
Statement *step.Step
G *Graph
Index int
// Depth starts at 0 and increases as
// visitStatement() is recursively called
// to visit child nodes.
//
// e.g.
// - and: <- depth = 0
// - A <- depth = 1
// - or: <- depth = 1
// - B <- depth = 2
// - C <- depth = 2
Depth int
// MaxDepth is the depth which cannot be exceeded by the compiler.
// Prevents users creating large nested resources to exhaust server resources.
MaxDepth int
Env *cel.Env // the CEL env
// NumStatements is the number of statements in the workflow.
// When visiting this is used to assert that an End node MUST be at
// the end of a workflow only.
NumStatements int
Parent *step.Step
Previous *step.Step
}
Directories
¶
| Path | Synopsis |
|---|---|
|
pkg
|
|
|
dialect
Package dialect contain definitions for Glide dialects.
|
Package dialect contain definitions for Glide dialects. |
|
dialect/cf
Package cf contains the Common Fate dialect of Glide.
|
Package cf contains the Common Fate dialect of Glide. |
|
jsoncel
Package jsoncel implements a CEL Type Provider for JSON schema documents.
|
Package jsoncel implements a CEL Type Provider for JSON schema documents. |
|
noderr
Package noderr contains an error definition for compile and lint errors.
|
Package noderr contains an error definition for compile and lint errors. |
|
step/s
package 's' contains helper methods for building steps.
|
package 's' contains helper methods for building steps. |
Click to show internal directories.
Click to hide internal directories.