v1

package
v0.0.0-...-5fab299 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromK3sHandlerToHandler

func FromK3sHandlerToHandler(sync K3sHandler) generic.Handler

func RegisterK3sGeneratingHandler

func RegisterK3sGeneratingHandler(ctx context.Context, controller K3sController, apply apply.Apply,
	condition condition.Cond, name string, handler K3sGeneratingHandler, opts *generic.GeneratingHandlerOptions)

func RegisterK3sStatusHandler

func RegisterK3sStatusHandler(ctx context.Context, controller K3sController, condition condition.Cond, name string, handler K3sStatusHandler)

func UpdateK3sDeepCopyOnChange

func UpdateK3sDeepCopyOnChange(client K3sClient, obj *v1.K3s, handler func(obj *v1.K3s) (*v1.K3s, error)) (*v1.K3s, error)

Types

type Interface

type Interface interface {
	K3s() K3sController
}

func New

func New(controllerFactory controller.SharedControllerFactory) Interface

type K3sCache

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

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

type K3sClient

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

type K3sController

type K3sController interface {
	generic.ControllerMeta
	K3sClient

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

	Cache() K3sCache
}

func NewK3sController

func NewK3sController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) K3sController

type K3sGeneratingHandler

type K3sGeneratingHandler func(obj *v1.K3s, status v1.K3sStatus) ([]runtime.Object, v1.K3sStatus, error)

type K3sHandler

type K3sHandler func(string, *v1.K3s) (*v1.K3s, error)

type K3sIndexer

type K3sIndexer func(obj *v1.K3s) ([]string, error)

type K3sStatusHandler

type K3sStatusHandler func(obj *v1.K3s, status v1.K3sStatus) (v1.K3sStatus, error)

Jump to

Keyboard shortcuts

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