Documentation ¶
Index ¶
- Variables
- func EvalCondition(c *Condition) error
- func EvalConditions(cond []*Condition) error
- func NewContext(ctx context.Context, dag *DAG) context.Context
- func ReadFile(file string) (string, error)
- type BuildDAGOptions
- type Condition
- type ContinueOn
- type DAG
- type DAGBuilder
- type DAGContextKey
- type ExecutorConfig
- type HandlerOn
- type Loader
- type MailConfig
- type MailOn
- type RepeatPolicy
- type RetryPolicy
- type Schedule
- type SmtpConfig
- type Step
Constants ¶
This section is empty.
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.
func GetDAGFromContext ¶
GetDAGFromContext returns the DAG from the current context.
type DAGBuilder ¶
type DAGBuilder struct {
// contains filtered or unexported fields
}
type DAGContextKey ¶
type DAGContextKey struct{}
DAGContextKey is used as the key for storing the DAG in the context.
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 Description string Variables []string OutputVariables *utils.SyncMap Dir string ExecutorConfig ExecutorConfig CmdWithArgs string Command string Script string Stdout string Stderr string Output string Args []string Depends []string ContinueOn ContinueOn RetryPolicy *RetryPolicy RepeatPolicy RepeatPolicy MailOnError bool Preconditions []*Condition SignalOnStop string }
Step represents a step in a DAG.