v1

package
v1.1.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: Apache-2.0 Imports: 20 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromPlanHandlerToHandler

func FromPlanHandlerToHandler(sync PlanHandler) generic.Handler

func RegisterPlanGeneratingHandler

func RegisterPlanGeneratingHandler(ctx context.Context, controller PlanController, apply apply.Apply,
	condition condition.Cond, name string, handler PlanGeneratingHandler, opts *generic.GeneratingHandlerOptions)

func RegisterPlanStatusHandler

func RegisterPlanStatusHandler(ctx context.Context, controller PlanController, condition condition.Cond, name string, handler PlanStatusHandler)

func UpdatePlanDeepCopyOnChange

func UpdatePlanDeepCopyOnChange(client PlanClient, obj *v1.Plan, handler func(obj *v1.Plan) (*v1.Plan, error)) (*v1.Plan, error)

Types

type Interface

type Interface interface {
	Plan() PlanController
}

func New

func New(controllerFactory controller.SharedControllerFactory) Interface

type PlanCache

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

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

type PlanClient

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

type PlanController

type PlanController interface {
	generic.ControllerMeta
	PlanClient

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

	Cache() PlanCache
}

func NewPlanController

func NewPlanController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) PlanController

type PlanGeneratingHandler

type PlanGeneratingHandler func(obj *v1.Plan, status v1.PlanStatus) ([]runtime.Object, v1.PlanStatus, error)

type PlanHandler

type PlanHandler func(string, *v1.Plan) (*v1.Plan, error)

type PlanIndexer

type PlanIndexer func(obj *v1.Plan) ([]string, error)

type PlanStatusHandler

type PlanStatusHandler func(obj *v1.Plan, status v1.PlanStatus) (v1.PlanStatus, error)

Jump to

Keyboard shortcuts

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