Documentation ¶
Index ¶
- type GVKAgreggator
- func (b *GVKAgreggator) GVKs() []schema.GroupVersionKind
- func (b *GVKAgreggator) IsPresent(gvk schema.GroupVersionKind) bool
- func (b *GVKAgreggator) List(k Key) map[schema.GroupVersionKind]struct{}
- func (b *GVKAgreggator) Remove(k Key) error
- func (b *GVKAgreggator) Upsert(k Key, gvks []schema.GroupVersionKind) error
- type Key
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 ¶
func (b *GVKAgreggator) GVKs() []schema.GroupVersionKind
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 ¶
func (b *GVKAgreggator) List(k Key) map[schema.GroupVersionKind]struct{}
List returnes the gvk set for a given Key.
func (*GVKAgreggator) Remove ¶
func (b *GVKAgreggator) Remove(k Key) error
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) error
Upsert stores an association between Key k and the list of GVKs and also the reverse associatoin between each GVK passed in and Key k. Any old associations are dropped, unless they are included in the new list of GVKs. It errors out if there is an internal issue with remove the reverse Key links for any GVKs that are being dropped as part of this Upsert call.