tracker

package
v0.0.0-...-83b13a5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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

type Tracker

type Tracker 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
}

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

func New

func New(lease time.Duration, log logr.Logger) Tracker

New 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.

Jump to

Keyboard shortcuts

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