Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Kubeclient ¶
type Kubeclient struct {
// contains filtered or unexported fields
}
Kubeclient enables kubernetes API operationson runtask instance
func NewKubeClient ¶
func NewKubeClient(opts ...KubeclientBuildOption) *Kubeclient
NewKubeClient returns a new instance of kubeclient meant for runtask related operations
func (*Kubeclient) Get ¶
func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*apis.RunTask, error)
Get returns a runtask instance for given name
type KubeclientBuildOption ¶
type KubeclientBuildOption func(*Kubeclient)
KubeclientBuildOption defines the abstraction to build a Kubeclient instance
func WithClientset ¶
func WithClientset(c *clientset.Clientset) KubeclientBuildOption
WithClientset sets the kubernetes clientset against the kubeclient instance
func WithNamespace ¶
func WithNamespace(namespace string) KubeclientBuildOption
WithNamespace sets the namespace against the kubeclient instance
type Operations ¶
Operations abstracts all possible operations against runtask instance
type OptionFunc ¶
type OptionFunc func(*runtask)
OptionFunc is a typed function that abstracts anykind of operation against the provided runtask instance
This is the basic building block to create functional operations against the runtask instance
func AddRunItem ¶
func AddRunItem(i apis.RunItem) OptionFunc
AddRunItem adds a run item to the runtask instance
func WithConfig ¶
func WithConfig(c map[string]string) OptionFunc
WithConfig sets the config to the runtask instance
func WithSpec ¶
func WithSpec(spec *apis.RunTask) OptionFunc
WithSpec sets the runtask specifications
func WithStatus ¶
func WithStatus(s apis.RunTaskStatus) OptionFunc
WithStatus sets the runtask status
NOTE: It is typically invoked post runtask execution
func WithUnmarshal ¶
func WithUnmarshal(yml string) OptionFunc
WithUnmarshal unmarshals the provided yaml into corresponding runtask instance
type Predicate ¶
Predicate abstracts conditional logic w.r.t the runtask 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