tracker

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package tracker allows "tracking" resources to monitor "tracked" resources. All "tracking" resources can then be found for a given "tracked" resource. Tracker is thread-safe.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tracker

type Tracker struct {
	// contains filtered or unexported fields
}

Tracker allows "tracking" resources to monitor "tracked" resources. All "tracking" resources can then be found for a given "tracked" resource. Tracker is thread-safe.

func NewTracker

func NewTracker() *Tracker

NewTracker creates a new Tracker

func (*Tracker) GetTracking

func (s *Tracker) GetTracking(tracked types.NamespacedName) []types.NamespacedName

GetTracking returns all tracking objects for a given tracked object

func (*Tracker) Track

func (s *Tracker) Track(tracking types.NamespacedName, tracked ...types.NamespacedName)

Track records that the tracking object is interested in all tracked objects

func (*Tracker) UntrackAll

func (s *Tracker) UntrackAll(tracking types.NamespacedName)

UntrackAll untracks all tracking objects. This method is idempotent

Jump to

Keyboard shortcuts

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