clusterapi

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterWideKeyFunc

func ClusterWideKeyFunc(obj interface{}) (util.QueueKey, error)

ClusterWideKeyFunc generates a ClusterWideKey for object.

Types

type ClusterDetector

type ClusterDetector struct {
	KarmadaConfig         karmadactl.KarmadaConfig
	ControllerPlaneConfig *rest.Config
	ClusterAPIConfig      *rest.Config
	ClusterAPIClient      client.Client
	InformerManager       informermanager.SingleClusterInformerManager
	EventHandler          cache.ResourceEventHandler
	Processor             util.AsyncWorker
	// contains filtered or unexported fields
}

ClusterDetector is a cluster watcher which watched cluster object in cluster-api management cluster and reconcile the events.

func (*ClusterDetector) GetUnstructuredObject

func (d *ClusterDetector) GetUnstructuredObject(objectKey keys.ClusterWideKey) (*unstructured.Unstructured, error)

GetUnstructuredObject retrieves object by key and returned its unstructured.

func (*ClusterDetector) OnAdd

func (d *ClusterDetector) OnAdd(obj interface{})

OnAdd handles object add event and push the object to queue.

func (*ClusterDetector) OnDelete

func (d *ClusterDetector) OnDelete(obj interface{})

OnDelete handles object delete event and push the object to queue.

func (*ClusterDetector) OnUpdate

func (d *ClusterDetector) OnUpdate(oldObj, newObj interface{})

OnUpdate handles object update event and push the object to queue.

func (*ClusterDetector) Reconcile

func (d *ClusterDetector) Reconcile(key util.QueueKey) error

Reconcile performs a full reconciliation for the object referred to by the key. The key will be re-queued if an error is non-nil.

func (*ClusterDetector) Start

func (d *ClusterDetector) Start(ctx context.Context) error

Start runs the detector, never stop until stopCh closed.

Jump to

Keyboard shortcuts

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