objectwatcher

package
v1.17.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjectWatcher

type ObjectWatcher interface {
	Create(ctx context.Context, clusterName string, desireObj *unstructured.Unstructured) error
	Update(ctx context.Context, clusterName string, desireObj, clusterObj *unstructured.Unstructured) (operationResult OperationResult, err error)
	Delete(ctx context.Context, clusterName string, desireObj *unstructured.Unstructured) error
	NeedsUpdate(clusterName string, desiredObj, clusterObj *unstructured.Unstructured) bool
}

ObjectWatcher manages operations for object dispatched to member clusters.

func NewObjectWatcher

func NewObjectWatcher(kubeClientSet client.Client, restMapper meta.RESTMapper, clusterClientSetFunc util.NewClusterDynamicClientSetFunc, clusterClientOption *util.ClientOption, interpreter resourceinterpreter.ResourceInterpreter) ObjectWatcher

NewObjectWatcher returns an instance of ObjectWatcher

type OperationResult added in v1.14.0

type OperationResult string

OperationResult is the action result of an Update call.

const (
	// OperationResultNone means that the update operation was not performed and the resource has not been changed.
	OperationResultNone OperationResult = "none"
	// OperationResultUnchanged means that the update operation was performed but the resource did not change.
	OperationResultUnchanged OperationResult = "unchanged"
	// OperationResultUpdated means that an existing resource is updated.
	OperationResultUpdated OperationResult = "updated"
)

Jump to

Keyboard shortcuts

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