Documentation ¶
Index ¶
- Constants
- Variables
- func EvalCondition(c *Condition) error
- func EvalConditions(cond []*Condition) error
- func NewContext(ctx context.Context, dag *DAG, finder DAGFinder) context.Context
- func ReadFile(file string) (string, error)
- type BuildDAGOptions
- type Condition
- type Context
- type ContinueOn
- type DAG
- type DAGBuilder
- type DAGFinder
- type ExecutorConfig
- type HandlerOn
- type Loader
- type MailConfig
- type MailOn
- type RepeatPolicy
- type RetryPolicy
- type Schedule
- type SmtpConfig
- type Step
- type SubWorkflow
Constants ¶
const (
ExecutorTypeSubWorkflow = "subworkflow"
)
Variables ¶
var EXTENSIONS = []string{".yaml", ".yml"}
Functions ¶
func EvalCondition ¶
EvalCondition evaluates a single condition and checks the result.
func EvalConditions ¶
EvalConditions evaluates a list of conditions and checks the results.
func NewContext ¶
NewContext sets the current DAG to the context.
Types ¶
type BuildDAGOptions ¶
type BuildDAGOptions struct {
// contains filtered or unexported fields
}
type Condition ¶
Condition represents a condition to be evaluated by the agent.
func (*Condition) CheckResult ¶
CheckResult checks if the actual value of the condition matches the expected value.
type ContinueOn ¶
ContinueOn represents the conditions under which the step continues.
type DAG ¶
type DAG struct { Location string Group string Name string Schedule []*Schedule StopSchedule []*Schedule RestartSchedule []*Schedule Description string Env []string LogDir string HandlerOn HandlerOn Steps []Step MailOn *MailOn ErrorMail *MailConfig InfoMail *MailConfig Smtp *SmtpConfig Delay time.Duration RestartWait time.Duration HistRetentionDays int Preconditions []*Condition MaxActiveRuns int Params []string DefaultParams string MaxCleanUpTime time.Duration Tags []string }
DAG represents a DAG configuration.
type DAGBuilder ¶
type DAGBuilder struct {
// contains filtered or unexported fields
}
type ExecutorConfig ¶
ExecutorConfig represents the configuration for the executor of a step.
type Loader ¶
type Loader struct {
BaseConfig string
}
Loader is a config loader.
func (*Loader) LoadMetadata ¶
LoadMetadata loads config from file and returns only the headline data.
type RepeatPolicy ¶
RepeatPolicy represents the repeat policy for a step.
type RetryPolicy ¶
RetryPolicy represents the retry policy for a step.
type SmtpConfig ¶
type Step ¶
type Step struct { Name string `json:"Name"` Description string `json:"Description,omitempty"` Variables []string `json:"Variables,omitempty"` OutputVariables *utils.SyncMap `json:"OutputVariables,omitempty"` Dir string `json:"Dir,omitempty"` ExecutorConfig ExecutorConfig `json:"ExecutorConfig,omitempty"` CmdWithArgs string `json:"CmdWithArgs,omitempty"` Command string `json:"Command,omitempty"` Script string `json:"Script,omitempty"` Stdout string `json:"Stdout,omitempty"` Stderr string `json:"Stderr,omitempty"` Output string `json:"Output,omitempty"` Args []string `json:"Args,omitempty"` Depends []string `json:"Depends,omitempty"` ContinueOn ContinueOn `json:"ContinueOn,omitempty"` RetryPolicy *RetryPolicy `json:"RetryPolicy,omitempty"` RepeatPolicy RepeatPolicy `json:"RepeatPolicy,omitempty"` MailOnError bool `json:"MailOnError,omitempty"` Preconditions []*Condition `json:"Preconditions,omitempty"` SignalOnStop string `json:"SignalOnStop,omitempty"` SubWorkflow *SubWorkflow `json:"SubWorkflow,omitempty"` }
Step represents a step in a DAG.