v1

package
v0.3.2-rc2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromNodeHandlerToHandler

func FromNodeHandlerToHandler(sync NodeHandler) generic.Handler

func FromPodHandlerToHandler

func FromPodHandlerToHandler(sync PodHandler) generic.Handler

func FromSecretHandlerToHandler

func FromSecretHandlerToHandler(sync SecretHandler) generic.Handler

func RegisterNodeGeneratingHandler

func RegisterNodeGeneratingHandler(ctx context.Context, controller NodeController, apply apply.Apply,
	condition condition.Cond, name string, handler NodeGeneratingHandler, opts *generic.GeneratingHandlerOptions)

func RegisterNodeStatusHandler

func RegisterNodeStatusHandler(ctx context.Context, controller NodeController, condition condition.Cond, name string, handler NodeStatusHandler)

func RegisterPodGeneratingHandler

func RegisterPodGeneratingHandler(ctx context.Context, controller PodController, apply apply.Apply,
	condition condition.Cond, name string, handler PodGeneratingHandler, opts *generic.GeneratingHandlerOptions)

func RegisterPodStatusHandler

func RegisterPodStatusHandler(ctx context.Context, controller PodController, condition condition.Cond, name string, handler PodStatusHandler)

func UpdateNodeDeepCopyOnChange

func UpdateNodeDeepCopyOnChange(client NodeClient, obj *v1.Node, handler func(obj *v1.Node) (*v1.Node, error)) (*v1.Node, error)

func UpdatePodDeepCopyOnChange

func UpdatePodDeepCopyOnChange(client PodClient, obj *v1.Pod, handler func(obj *v1.Pod) (*v1.Pod, error)) (*v1.Pod, error)

func UpdateSecretDeepCopyOnChange

func UpdateSecretDeepCopyOnChange(client SecretClient, obj *v1.Secret, handler func(obj *v1.Secret) (*v1.Secret, error)) (*v1.Secret, error)

Types

type Interface

type Interface interface {
	Node() NodeController
	Pod() PodController
	Secret() SecretController
}

func New

func New(controllerFactory controller.SharedControllerFactory) Interface

type NodeCache

type NodeCache interface {
	Get(name string) (*v1.Node, error)
	List(selector labels.Selector) ([]*v1.Node, error)

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

type NodeClient

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

type NodeController

type NodeController interface {
	generic.ControllerMeta
	NodeClient

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

	Cache() NodeCache
}

func NewNodeController

func NewNodeController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) NodeController

type NodeGeneratingHandler

type NodeGeneratingHandler func(obj *v1.Node, status v1.NodeStatus) ([]runtime.Object, v1.NodeStatus, error)

type NodeHandler

type NodeHandler func(string, *v1.Node) (*v1.Node, error)

type NodeIndexer

type NodeIndexer func(obj *v1.Node) ([]string, error)

type NodeStatusHandler

type NodeStatusHandler func(obj *v1.Node, status v1.NodeStatus) (v1.NodeStatus, error)

type PodCache

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

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

type PodClient

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

type PodController

type PodController interface {
	generic.ControllerMeta
	PodClient

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

	Cache() PodCache
}

func NewPodController

func NewPodController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) PodController

type PodGeneratingHandler

type PodGeneratingHandler func(obj *v1.Pod, status v1.PodStatus) ([]runtime.Object, v1.PodStatus, error)

type PodHandler

type PodHandler func(string, *v1.Pod) (*v1.Pod, error)

type PodIndexer

type PodIndexer func(obj *v1.Pod) ([]string, error)

type PodStatusHandler

type PodStatusHandler func(obj *v1.Pod, status v1.PodStatus) (v1.PodStatus, error)

type SecretCache

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

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

type SecretClient

type SecretClient interface {
	Create(*v1.Secret) (*v1.Secret, error)
	Update(*v1.Secret) (*v1.Secret, error)

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

type SecretController

type SecretController interface {
	generic.ControllerMeta
	SecretClient

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

	Cache() SecretCache
}

func NewSecretController

func NewSecretController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) SecretController

type SecretHandler

type SecretHandler func(string, *v1.Secret) (*v1.Secret, error)

type SecretIndexer

type SecretIndexer func(obj *v1.Secret) ([]string, error)

Jump to

Keyboard shortcuts

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