gc

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Prefix                 = "multicluster.admiralty.io/parent-"
	LabelParentName        = Prefix + "name"
	LabelParentNamespace   = Prefix + "namespace"
	LabelParentClusterName = Prefix + "clusterName"
)

Functions

func IsChildNotFoundErr

func IsChildNotFoundErr(err error) bool

func IsDuplicateChildErr

func IsDuplicateChildErr(err error) bool

func NewController

func NewController(parentCluster *cluster.Cluster, childCluster *cluster.Cluster, o Options) (*controller.Controller, error)

Types

type Applier

type Applier interface {
	MakeChild(parent interface{}, expectedChild interface{}) error
	ChildNeedsUpdate(parent interface{}, child interface{}, expectedChild interface{}) (bool, error)
	MutateChild(parent interface{}, child interface{}, expectedChild interface{}) error
}

type Options

type Options struct {
	ParentPrototype            runtime.Object
	ChildPrototype             runtime.Object
	ParentWatchOptions         controller.WatchOptions
	ChildNamespace             string // optional, can optimize List operations vs. it only be set in MakeChild
	Applier                    Applier
	CopyLabels                 bool
	MakeSelector               func(parent interface{}) labels.Set // optional
	MakeExpectedChildWhenFound bool
}

Jump to

Keyboard shortcuts

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