v1

package
v0.8.4-0...-97960e5 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromLeaseHandlerToHandler

func FromLeaseHandlerToHandler(sync LeaseHandler) generic.Handler

func UpdateLeaseDeepCopyOnChange

func UpdateLeaseDeepCopyOnChange(client LeaseClient, obj *v1.Lease, handler func(obj *v1.Lease) (*v1.Lease, error)) (*v1.Lease, error)

Types

type Interface

type Interface interface {
	Lease() LeaseController
}

func New

func New(controllerFactory controller.SharedControllerFactory) Interface

type LeaseCache

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

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

type LeaseClient

type LeaseClient interface {
	Create(*v1.Lease) (*v1.Lease, error)
	Update(*v1.Lease) (*v1.Lease, error)

	Delete(namespace, name string, options *metav1.DeleteOptions) error
	Get(namespace, name string, options metav1.GetOptions) (*v1.Lease, error)
	List(namespace string, opts metav1.ListOptions) (*v1.LeaseList, error)
	Watch(namespace string, opts metav1.ListOptions) (watch.Interface, error)
	Patch(namespace, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Lease, err error)
}

type LeaseController

type LeaseController interface {
	generic.ControllerMeta
	LeaseClient

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

	Cache() LeaseCache
}

func NewLeaseController

func NewLeaseController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) LeaseController

type LeaseHandler

type LeaseHandler func(string, *v1.Lease) (*v1.Lease, error)

type LeaseIndexer

type LeaseIndexer func(obj *v1.Lease) ([]string, error)

Jump to

Keyboard shortcuts

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