offspring

package
v0.0.0-...-59c4a29 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChildWatch

type ChildWatch struct {
	ObjectClient clientbase.ObjectClient
	Informer     cache.SharedInformer
}

type ChildWatcher

type ChildWatcher struct {
	ObjectClient *clientbase.ObjectClient
	Informer     cache.SharedInformer
	Scheme       runtime.Scheme
	// optional
	CompareKeys []string
	// optional
	ParentLookup ParentLookup
	// contains filtered or unexported fields
}

func (*ChildWatcher) OnAdd

func (w *ChildWatcher) OnAdd(obj interface{})

func (*ChildWatcher) OnDelete

func (w *ChildWatcher) OnDelete(obj interface{})

func (*ChildWatcher) OnUpdate

func (w *ChildWatcher) OnUpdate(oldObj, newObj interface{})

type Enqueue

type Enqueue func(namespace, name string)

type Generator

type Generator func(obj runtime.Object) (ObjectSet, error)

type KnownObjectSet

type KnownObjectSet struct {
	Children map[ObjectReference]runtime.Object
}

type ObjectReference

type ObjectReference struct {
	Kind       string
	Namespace  string
	Name       string
	APIVersion string
}

type ObjectSet

type ObjectSet struct {
	Parent   runtime.Object
	Children []runtime.Object
	Complete bool
}

type ParentLookup

type ParentLookup func(obj runtime.Object) *ParentReference

func OwnerReferenceLookup

func OwnerReferenceLookup(gvk schema.GroupVersionKind) ParentLookup

type ParentReference

type ParentReference struct {
	Namespace string
	Name      string
}

type Reconciliation

type Reconciliation struct {
	sync.Mutex
	Generator    Generator
	Enqueue      Enqueue
	ObjectClient *clientbase.ObjectClient
	Children     []ChildWatcher
	// contains filtered or unexported fields
}

func NewReconciliation

func NewReconciliation(ctx context.Context, generator Generator, enqueue Enqueue, client *clientbase.ObjectClient, children ...ChildWatcher) *Reconciliation

func (*Reconciliation) Changed

func (w *Reconciliation) Changed(key string, obj runtime.Object) (runtime.Object, error)

Jump to

Keyboard shortcuts

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