v1beta1

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Builder

func Builder() *builder

Builder returns a new instance of builder

func New

func New(opts ...OptionFunc) apis.RunItem

New returns a new RunItem

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 AddOption

func AddOption(o apis.Option) OptionFunc

AddOption adds a runitem option

func WithAPIVersion

func WithAPIVersion(version string) OptionFunc

WithAPIVersion sets the runitem api version

func WithAction

func WithAction(a apis.Action) OptionFunc

WithAction sets the runitem action

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 WithID

func WithID(id string) OptionFunc

WithID sets the runitem identity

func WithKind

func WithKind(k apis.Kind) OptionFunc

WithKind sets the runitem kind

func WithName

func WithName(name string) OptionFunc

WithName sets the name of runitem

func WithOptions

func WithOptions(o []apis.Option) OptionFunc

WithOptions sets the runitem options

type Predicate

type Predicate func(*runitem) (message string, ok bool)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL