Documentation
¶
Overview ¶
Package predicate provides functions that wrap existing actions but executes them only on conditions ("predicates"). If a predicate evaluates to false, the wrapped action is not called and skips the step in the pipeline, indicating success.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToNestedStep ¶
ToNestedStep wraps the given pipeline in its own step. When the step's function is called, the given Predicate will evaluate whether the nested pipeline.Pipeline should actually run. It returns the pipeline's pipeline.Result, otherwise an empty (successful) pipeline.Result struct.
Types ¶
type Predicate ¶
Predicate is a function that expects 'true' if a pipeline.ActionFunc should run. Is is evaluated lazily resp. only when needed.
func And ¶
And returns a Predicate that does logical AND of the given predicates. p2 is not evaluated if p1 evaluates already to false.