v1

package
v0.0.13-alpha1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromExecutionHandlerToHandler

func FromExecutionHandlerToHandler(sync ExecutionHandler) generic.Handler

func FromModuleHandlerToHandler

func FromModuleHandlerToHandler(sync ModuleHandler) generic.Handler

func FromStateHandlerToHandler

func FromStateHandlerToHandler(sync StateHandler) generic.Handler

func RegisterExecutionGeneratingHandler

func RegisterExecutionGeneratingHandler(ctx context.Context, controller ExecutionController, apply apply.Apply,
	condition condition.Cond, name string, handler ExecutionGeneratingHandler, opts *generic.GeneratingHandlerOptions)

func RegisterExecutionStatusHandler

func RegisterExecutionStatusHandler(ctx context.Context, controller ExecutionController, condition condition.Cond, name string, handler ExecutionStatusHandler)

func RegisterModuleGeneratingHandler

func RegisterModuleGeneratingHandler(ctx context.Context, controller ModuleController, apply apply.Apply,
	condition condition.Cond, name string, handler ModuleGeneratingHandler, opts *generic.GeneratingHandlerOptions)

func RegisterModuleStatusHandler

func RegisterModuleStatusHandler(ctx context.Context, controller ModuleController, condition condition.Cond, name string, handler ModuleStatusHandler)

func RegisterStateGeneratingHandler

func RegisterStateGeneratingHandler(ctx context.Context, controller StateController, apply apply.Apply,
	condition condition.Cond, name string, handler StateGeneratingHandler, opts *generic.GeneratingHandlerOptions)

func RegisterStateStatusHandler

func RegisterStateStatusHandler(ctx context.Context, controller StateController, condition condition.Cond, name string, handler StateStatusHandler)

func UpdateExecutionDeepCopyOnChange

func UpdateExecutionDeepCopyOnChange(client ExecutionClient, obj *v1.Execution, handler func(obj *v1.Execution) (*v1.Execution, error)) (*v1.Execution, error)

func UpdateModuleDeepCopyOnChange

func UpdateModuleDeepCopyOnChange(client ModuleClient, obj *v1.Module, handler func(obj *v1.Module) (*v1.Module, error)) (*v1.Module, error)

func UpdateStateDeepCopyOnChange

func UpdateStateDeepCopyOnChange(client StateClient, obj *v1.State, handler func(obj *v1.State) (*v1.State, error)) (*v1.State, error)

Types

type ExecutionCache

type ExecutionCache interface {
	Get(namespace, name string) (*v1.Execution, error)
	List(namespace string, selector labels.Selector) ([]*v1.Execution, error)

	AddIndexer(indexName string, indexer ExecutionIndexer)
	GetByIndex(indexName, key string) ([]*v1.Execution, error)
}

type ExecutionClient

type ExecutionClient interface {
	Create(*v1.Execution) (*v1.Execution, error)
	Update(*v1.Execution) (*v1.Execution, error)
	UpdateStatus(*v1.Execution) (*v1.Execution, error)
	Delete(namespace, name string, options *metav1.DeleteOptions) error
	Get(namespace, name string, options metav1.GetOptions) (*v1.Execution, error)
	List(namespace string, opts metav1.ListOptions) (*v1.ExecutionList, error)
	Watch(namespace string, opts metav1.ListOptions) (watch.Interface, error)
	Patch(namespace, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Execution, err error)
}

type ExecutionController

type ExecutionController interface {
	generic.ControllerMeta
	ExecutionClient

	OnChange(ctx context.Context, name string, sync ExecutionHandler)
	OnRemove(ctx context.Context, name string, sync ExecutionHandler)
	Enqueue(namespace, name string)
	EnqueueAfter(namespace, name string, duration time.Duration)

	Cache() ExecutionCache
}

func NewExecutionController

func NewExecutionController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) ExecutionController

type ExecutionGeneratingHandler

type ExecutionGeneratingHandler func(obj *v1.Execution, status v1.ExecutionStatus) ([]runtime.Object, v1.ExecutionStatus, error)

type ExecutionHandler

type ExecutionHandler func(string, *v1.Execution) (*v1.Execution, error)

type ExecutionIndexer

type ExecutionIndexer func(obj *v1.Execution) ([]string, error)

type ExecutionStatusHandler

type ExecutionStatusHandler func(obj *v1.Execution, status v1.ExecutionStatus) (v1.ExecutionStatus, error)

type Interface

type Interface interface {
	Execution() ExecutionController
	Module() ModuleController
	State() StateController
}

func New

func New(controllerFactory controller.SharedControllerFactory) Interface

type ModuleCache

type ModuleCache interface {
	Get(namespace, name string) (*v1.Module, error)
	List(namespace string, selector labels.Selector) ([]*v1.Module, error)

	AddIndexer(indexName string, indexer ModuleIndexer)
	GetByIndex(indexName, key string) ([]*v1.Module, error)
}

type ModuleClient

type ModuleClient interface {
	Create(*v1.Module) (*v1.Module, error)
	Update(*v1.Module) (*v1.Module, error)
	UpdateStatus(*v1.Module) (*v1.Module, error)
	Delete(namespace, name string, options *metav1.DeleteOptions) error
	Get(namespace, name string, options metav1.GetOptions) (*v1.Module, error)
	List(namespace string, opts metav1.ListOptions) (*v1.ModuleList, error)
	Watch(namespace string, opts metav1.ListOptions) (watch.Interface, error)
	Patch(namespace, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Module, err error)
}

type ModuleController

type ModuleController interface {
	generic.ControllerMeta
	ModuleClient

	OnChange(ctx context.Context, name string, sync ModuleHandler)
	OnRemove(ctx context.Context, name string, sync ModuleHandler)
	Enqueue(namespace, name string)
	EnqueueAfter(namespace, name string, duration time.Duration)

	Cache() ModuleCache
}

func NewModuleController

func NewModuleController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) ModuleController

type ModuleGeneratingHandler

type ModuleGeneratingHandler func(obj *v1.Module, status v1.ModuleStatus) ([]runtime.Object, v1.ModuleStatus, error)

type ModuleHandler

type ModuleHandler func(string, *v1.Module) (*v1.Module, error)

type ModuleIndexer

type ModuleIndexer func(obj *v1.Module) ([]string, error)

type ModuleStatusHandler

type ModuleStatusHandler func(obj *v1.Module, status v1.ModuleStatus) (v1.ModuleStatus, error)

type StateCache

type StateCache interface {
	Get(namespace, name string) (*v1.State, error)
	List(namespace string, selector labels.Selector) ([]*v1.State, error)

	AddIndexer(indexName string, indexer StateIndexer)
	GetByIndex(indexName, key string) ([]*v1.State, error)
}

type StateClient

type StateClient interface {
	Create(*v1.State) (*v1.State, error)
	Update(*v1.State) (*v1.State, error)
	UpdateStatus(*v1.State) (*v1.State, error)
	Delete(namespace, name string, options *metav1.DeleteOptions) error
	Get(namespace, name string, options metav1.GetOptions) (*v1.State, error)
	List(namespace string, opts metav1.ListOptions) (*v1.StateList, error)
	Watch(namespace string, opts metav1.ListOptions) (watch.Interface, error)
	Patch(namespace, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.State, err error)
}

type StateController

type StateController interface {
	generic.ControllerMeta
	StateClient

	OnChange(ctx context.Context, name string, sync StateHandler)
	OnRemove(ctx context.Context, name string, sync StateHandler)
	Enqueue(namespace, name string)
	EnqueueAfter(namespace, name string, duration time.Duration)

	Cache() StateCache
}

func NewStateController

func NewStateController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) StateController

type StateGeneratingHandler

type StateGeneratingHandler func(obj *v1.State, status v1.StateStatus) ([]runtime.Object, v1.StateStatus, error)

type StateHandler

type StateHandler func(string, *v1.State) (*v1.State, error)

type StateIndexer

type StateIndexer func(obj *v1.State) ([]string, error)

type StateStatusHandler

type StateStatusHandler func(obj *v1.State, status v1.StateStatus) (v1.StateStatus, error)

Jump to

Keyboard shortcuts

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