Documentation ¶
Index ¶
- func Builder() *builder
- func New(opts ...OptionFunc) apis.RunItem
- type OptionFunc
- func AddCondition(c apis.Condition) OptionFunc
- func AddOption(o apis.Option) OptionFunc
- func WithAPIVersion(version string) OptionFunc
- func WithAction(a apis.Action) OptionFunc
- func WithConditionOperator(o apis.ConditionOperator) OptionFunc
- func WithConditions(c []apis.Condition) OptionFunc
- func WithID(id string) OptionFunc
- func WithKind(k apis.Kind) OptionFunc
- func WithName(name string) OptionFunc
- func WithOptions(o []apis.Option) OptionFunc
- type Predicate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OptionFunc ¶
type OptionFunc func(*runitem)
OptionFunc is a typed function that abstracts any kind of operation against the provided runitem instance
This is the basic building block to create functional operations against the runitem instance
func AddCondition ¶
func AddCondition(c apis.Condition) OptionFunc
AddCondition adds a runitem condition
func WithAPIVersion ¶
func WithAPIVersion(version string) OptionFunc
WithAPIVersion sets the runitem api version
func WithConditionOperator ¶
func WithConditionOperator(o apis.ConditionOperator) OptionFunc
WithConditionOperator sets the runitem condition operator
func WithConditions ¶
func WithConditions(c []apis.Condition) OptionFunc
WithConditions sets the runitem conditions
func WithOptions ¶
func WithOptions(o []apis.Option) OptionFunc
WithOptions sets the runitem options
type Predicate ¶
Predicate abstracts conditional logic w.r.t runitem instance
NOTE: Predicate is a functional approach versus traditional approach to mix conditions such as *if-else* within blocks of business logic
NOTE: Predicate approach enables clear separation of conditionals from imperatives i.e. actions that form the business logic