gc

package
v0.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LabelParentUID = "multicluster.admiralty.io/parent-uid"
)

Functions

func IsChildNotFoundErr

func IsChildNotFoundErr(err error) bool

func IsDuplicateChildErr

func IsDuplicateChildErr(err error) bool

func NewController

func NewController(ctx context.Context, parentClusters []*cluster.Cluster, childClusters []*cluster.Cluster, o Options) (*controller.Controller, error)

Types

type Applier

type Applier interface {
	ChildClusterName(parent interface{}) (string, error)
	MakeChild(parent interface{}, expectedChild interface{}) error
	MutateChild(parent interface{}, child interface{}, expectedChild interface{}) (needUpdate bool, err error)
	MutateParent(parent interface{}, childFound bool, child interface{}) (needUpdate bool, needStatusUpdate bool, err 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
	GetImpersonatorForChildWriter func(clusterName string) string
}

Jump to

Keyboard shortcuts

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