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 (*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
Click to show internal directories.
Click to hide internal directories.