dependency

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DependencyTracker

type DependencyTracker interface {
	// Track tells us that "obj" is tracking changes to the
	// referenced object.
	Track(ref Key, obj types.NamespacedName)

	// Lookup returns actively tracked objects for the reference.
	Lookup(ref Key) []types.NamespacedName

	// ClearTracked stops tracking all resources for the
	// referenced object
	ClearTracked(obj types.NamespacedName)
}

DependencyTracker defines the interface through which an object can register that it is tracking another object by reference.

func NewDependencyTracker

func NewDependencyTracker(lease time.Duration, log logr.Logger) DependencyTracker

NewDependencyTracker returns an implementation of Tracker that lets a Reconciler register a particular resource as watching a resource for a particular lease duration. This watch must be refreshed periodically (e.g. by a controller resync) or it will expire.

type Key

type Key struct {
	GroupKind      schema.GroupKind
	NamespacedName types.NamespacedName
}

func NewKey

func NewKey(gvk schema.GroupVersionKind, namespacedName types.NamespacedName) Key

func (*Key) String

func (k *Key) String() string

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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