Version: v0.0.10 Latest Latest

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

Go to latest
Published: May 6, 2019 License: Apache-2.0 Imports: 12 Imported by: 0




This section is empty.


This section is empty.


func RetainClusterFields

func RetainClusterFields(targetKind string, desiredObj, clusterObj, fedObj *unstructured.Unstructured) error

RetainClusterFields updates the desired object with values retained from the cluster object.


type DispatchRecorder

type DispatchRecorder interface {
	RecordError(clusterName, operation string, err error)
	RecordEvent(clusterName, operation, operationContinuous string)

type FederatedResourceForDispatch

type FederatedResourceForDispatch interface {
	TargetName() util.QualifiedName
	TargetKind() string
	Object() *unstructured.Unstructured
	VersionForCluster(clusterName string) (string, error)
	ObjectForCluster(clusterName string) (*unstructured.Unstructured, error)
	RecordError(errorCode string, err error)
	RecordEvent(reason, messageFmt string, args ...interface{})

FederatedResourceForDispatch is the subset of the FederatedResource interface required for dispatching operations to managed resources.

type ManagedDispatcher

type ManagedDispatcher interface {

	Create(clusterName string)
	Update(clusterName string, clusterObj *unstructured.Unstructured)
	VersionMap() map[string]string

ManagedDispatcher dispatches operations to member clusters for resources managed by a federated resource.

func NewManagedDispatcher

func NewManagedDispatcher(clientAccessor clientAccessorFunc, fedResource FederatedResourceForDispatch, skipAdoptingResources bool) ManagedDispatcher

type OperationDispatcher

type OperationDispatcher interface {
	// Wait returns true for ok if all operations completed
	// successfully and false if only some operations completed
	// successfully.  An error is returned on timeout.
	Wait() (ok bool, timeoutErr error)

OperationDispatcher provides an interface to wait for operations dispatched to member clusters.

type UnmanagedDispatcher

type UnmanagedDispatcher interface {

	Delete(clusterName string)
	RemoveManagedLabel(clusterName string, clusterObj *unstructured.Unstructured)

UnmanagedDispatcher dispatches operations to member clusters for resources that are no longer managed by a federated resource.

func NewUnmanagedDispatcher

func NewUnmanagedDispatcher(clientAccessor clientAccessorFunc, targetKind string, targetName util.QualifiedName) UnmanagedDispatcher

Jump to

Keyboard shortcuts

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