aggregator

package
v3.17.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GVKAgreggator

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

GVKAgreggator is an implementation of a bi directional map that stores associations between Key K and GVKs and reverse associations between GVK g and Keys.

func NewGVKAggregator

func NewGVKAggregator() *GVKAgreggator

func (*GVKAgreggator) GVKs

GVKs returns a list of all of the schema.GroupVersionKind that are aggregated.

func (*GVKAgreggator) IsPresent

func (b *GVKAgreggator) IsPresent(gvk schema.GroupVersionKind) bool

IsPresent returns true if the given gvk is present in the GVKAggregator.

func (*GVKAgreggator) List

List returnes the gvk set for a given Key.

func (*GVKAgreggator) Remove

func (b *GVKAgreggator) Remove(k Key)

Remove deletes any associations that Key k has in the GVKAggregator. For any GVK in the association k --> [GVKs], we also delete any associations between the GVK and the Key k stored in the reverse map.

func (*GVKAgreggator) Upsert

func (b *GVKAgreggator) Upsert(k Key, gvks []schema.GroupVersionKind)

Upsert stores an association between Key k and the list of GVKs and also the reverse association between each GVK passed in and Key k. Any old associations are dropped, unless they are included in the new list of GVKs.

type Key

type Key struct {
	// Source specifies the type of the source object.
	Source string
	// ID specifies the name of the instance of the source object.
	ID string
}

Key defines a type, identifier tuple to store in the GVKAggregator.

Jump to

Keyboard shortcuts

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