replication

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnnotationKeyOriginalResourceVersion = "cache.kcp.io/original-resource-version"
	AnnotationKeyOriginalResourceUID     = "cache.kcp.io/original-resource-UID"
)
View Source
const (
	// ControllerName hold this controller name.
	ControllerName = "kcp-cached-resource-replication-controller"
)

Variables

This section is empty.

Functions

func InstallIndexers

func InstallIndexers(replicated *ReplicatedGVR)

InstallIndexers adds the additional indexers that this controller requires to the informers.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func NewController

func NewController(
	shardName string,
	localDynamicClusterClient kcpdynamic.ClusterInterface,
	globalDynamicClusterClient kcpdynamic.ClusterInterface,
	kcpCacheClient kcpclientset.ClusterInterface,
	cacheApiExtensionsClusterClient kcpapiextensionsclientset.ClusterInterface,
	cluster logicalcluster.Name,
	gvr schema.GroupVersionResource,
	replicated *ReplicatedGVR,
	requeueSelf func(),
	localLabelSelector labels.Selector,
) (*Controller, error)

NewController returns a new replication controller.

func (*Controller) SetDeleted

func (c *Controller) SetDeleted(ctx context.Context)

func (*Controller) SetLabelSelector

func (c *Controller) SetLabelSelector(localLabelSelector labels.Selector)

func (*Controller) Start

func (c *Controller) Start(ctx context.Context, workers int)

Start starts the controller, which stops when ctx.Done() is closed.

func (*Controller) Started

func (c *Controller) Started() bool

type ReplicatedGVR

type ReplicatedGVR struct {
	Kind          string
	Identity      string
	Filter        func(u *unstructured.Unstructured) bool
	Global, Local cache.SharedIndexInformer
}

Jump to

Keyboard shortcuts

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