v1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromClusterHandlerToHandler

func FromClusterHandlerToHandler(sync ClusterHandler) generic.Handler

func RegisterClusterGeneratingHandler

func RegisterClusterGeneratingHandler(ctx context.Context, controller ClusterController, apply apply.Apply,
	condition condition.Cond, name string, handler ClusterGeneratingHandler, opts *generic.GeneratingHandlerOptions)

func RegisterClusterStatusHandler

func RegisterClusterStatusHandler(ctx context.Context, controller ClusterController, condition condition.Cond, name string, handler ClusterStatusHandler)

func UpdateClusterDeepCopyOnChange

func UpdateClusterDeepCopyOnChange(client ClusterClient, obj *v1.Cluster, handler func(obj *v1.Cluster) (*v1.Cluster, error)) (*v1.Cluster, error)

Types

type ClusterCache

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

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

type ClusterClient

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

type ClusterController

type ClusterController interface {
	generic.ControllerMeta
	ClusterClient

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

	Cache() ClusterCache
}

func NewClusterController

func NewClusterController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) ClusterController

type ClusterGeneratingHandler

type ClusterGeneratingHandler func(obj *v1.Cluster, status v1.ClusterStatus) ([]runtime.Object, v1.ClusterStatus, error)

type ClusterHandler

type ClusterHandler func(string, *v1.Cluster) (*v1.Cluster, error)

type ClusterIndexer

type ClusterIndexer func(obj *v1.Cluster) ([]string, error)

type ClusterStatusHandler

type ClusterStatusHandler func(obj *v1.Cluster, status v1.ClusterStatus) (v1.ClusterStatus, error)

type Interface

type Interface interface {
	Cluster() ClusterController
}

func New

func New(controllerFactory controller.SharedControllerFactory) Interface

Jump to

Keyboard shortcuts

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