sets

package module
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: Apache-2.0 Imports: 6 Imported by: 4

README

PkgGoDev

sets

This library contains auto generated set data structures for various Kubernetes types.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EdgeLabel

type EdgeLabel map[kmapi.EdgeLabel]Empty

sets.EdgeLabel is a set of kmapi.EdgeLabels, implemented via map[kmapi.EdgeLabel]struct{} for minimal memory consumption.

func EdgeLabelKeySet

func EdgeLabelKeySet(theMap interface{}) EdgeLabel

EdgeLabelKeySet creates a EdgeLabel from a keys of a map[kmapi.EdgeLabel](? extends interface{}). If the value passed in is not actually a map, this will panic.

func NewEdgeLabel

func NewEdgeLabel(items ...kmapi.EdgeLabel) EdgeLabel

NewEdgeLabel creates a EdgeLabel from a list of values.

func (EdgeLabel) Delete

func (s EdgeLabel) Delete(items ...kmapi.EdgeLabel) EdgeLabel

Delete removes all items from the set.

func (EdgeLabel) Difference

func (s EdgeLabel) Difference(s2 EdgeLabel) EdgeLabel

Difference returns a set of objects that are not in s2 For example: s1 = {a1, a2, a3} s2 = {a1, a2, a4, a5} s1.Difference(s2) = {a3} s2.Difference(s1) = {a4, a5}

func (EdgeLabel) Equal

func (s1 EdgeLabel) Equal(s2 EdgeLabel) bool

Equal returns true if and only if s1 is equal (as a set) to s2. Two sets are equal if their membership is identical. (In practice, this means same elements, order doesn't matter)

func (EdgeLabel) Has

func (s EdgeLabel) Has(item kmapi.EdgeLabel) bool

Has returns true if and only if item is contained in the set.

func (EdgeLabel) HasAll

func (s EdgeLabel) HasAll(items ...kmapi.EdgeLabel) bool

HasAll returns true if and only if all items are contained in the set.

func (EdgeLabel) HasAny

func (s EdgeLabel) HasAny(items ...kmapi.EdgeLabel) bool

HasAny returns true if any items are contained in the set.

func (EdgeLabel) Insert

func (s EdgeLabel) Insert(items ...kmapi.EdgeLabel) EdgeLabel

Insert adds items to the set.

func (EdgeLabel) Intersection

func (s1 EdgeLabel) Intersection(s2 EdgeLabel) EdgeLabel

Intersection returns a new set which includes the item in BOTH s1 and s2 For example: s1 = {a1, a2} s2 = {a2, a3} s1.Intersection(s2) = {a2}

func (EdgeLabel) IsSuperset

func (s1 EdgeLabel) IsSuperset(s2 EdgeLabel) bool

IsSuperset returns true if and only if s1 is a superset of s2.

func (EdgeLabel) Len

func (s EdgeLabel) Len() int

Len returns the size of the set.

func (EdgeLabel) List

func (s EdgeLabel) List() []kmapi.EdgeLabel

List returns the contents as a sorted kmapi.EdgeLabel slice.

func (EdgeLabel) PopAny

func (s EdgeLabel) PopAny() (kmapi.EdgeLabel, bool)

Returns a single element from the set.

func (EdgeLabel) Union

func (s1 EdgeLabel) Union(s2 EdgeLabel) EdgeLabel

Union returns a new set which includes items in either s1 or s2. For example: s1 = {a1, a2} s2 = {a3, a4} s1.Union(s2) = {a1, a2, a3, a4} s2.Union(s1) = {a1, a2, a3, a4}

func (EdgeLabel) UnsortedList

func (s EdgeLabel) UnsortedList() []kmapi.EdgeLabel

UnsortedList returns the slice with contents in random order.

type Empty

type Empty struct{}

Empty is public since it is used by some internal API objects for conversions between external string arrays and internal sets, and conversion logic requires public types today.

type GroupKind

type GroupKind map[schema.GroupKind]Empty

sets.GroupKind is a set of schema.GroupKinds, implemented via map[schema.GroupKind]struct{} for minimal memory consumption.

func GroupKindKeySet

func GroupKindKeySet(theMap interface{}) GroupKind

GroupKindKeySet creates a GroupKind from a keys of a map[schema.GroupKind](? extends interface{}). If the value passed in is not actually a map, this will panic.

func NewGroupKind

func NewGroupKind(items ...schema.GroupKind) GroupKind

NewGroupKind creates a GroupKind from a list of values.

func (GroupKind) Delete

func (s GroupKind) Delete(items ...schema.GroupKind) GroupKind

Delete removes all items from the set.

func (GroupKind) Difference

func (s GroupKind) Difference(s2 GroupKind) GroupKind

Difference returns a set of objects that are not in s2 For example: s1 = {a1, a2, a3} s2 = {a1, a2, a4, a5} s1.Difference(s2) = {a3} s2.Difference(s1) = {a4, a5}

func (GroupKind) Equal

func (s1 GroupKind) Equal(s2 GroupKind) bool

Equal returns true if and only if s1 is equal (as a set) to s2. Two sets are equal if their membership is identical. (In practice, this means same elements, order doesn't matter)

func (GroupKind) Has

func (s GroupKind) Has(item schema.GroupKind) bool

Has returns true if and only if item is contained in the set.

func (GroupKind) HasAll

func (s GroupKind) HasAll(items ...schema.GroupKind) bool

HasAll returns true if and only if all items are contained in the set.

func (GroupKind) HasAny

func (s GroupKind) HasAny(items ...schema.GroupKind) bool

HasAny returns true if any items are contained in the set.

func (GroupKind) Insert

func (s GroupKind) Insert(items ...schema.GroupKind) GroupKind

Insert adds items to the set.

func (GroupKind) Intersection

func (s1 GroupKind) Intersection(s2 GroupKind) GroupKind

Intersection returns a new set which includes the item in BOTH s1 and s2 For example: s1 = {a1, a2} s2 = {a2, a3} s1.Intersection(s2) = {a2}

func (GroupKind) IsSuperset

func (s1 GroupKind) IsSuperset(s2 GroupKind) bool

IsSuperset returns true if and only if s1 is a superset of s2.

func (GroupKind) Len

func (s GroupKind) Len() int

Len returns the size of the set.

func (GroupKind) List

func (s GroupKind) List() []schema.GroupKind

List returns the contents as a sorted schema.GroupKind slice.

func (GroupKind) PopAny

func (s GroupKind) PopAny() (schema.GroupKind, bool)

Returns a single element from the set.

func (GroupKind) Union

func (s1 GroupKind) Union(s2 GroupKind) GroupKind

Union returns a new set which includes items in either s1 or s2. For example: s1 = {a1, a2} s2 = {a3, a4} s1.Union(s2) = {a1, a2, a3, a4} s2.Union(s1) = {a1, a2, a3, a4}

func (GroupKind) UnsortedList

func (s GroupKind) UnsortedList() []schema.GroupKind

UnsortedList returns the slice with contents in random order.

type MetaGroupKind

type MetaGroupKind map[metav1.GroupKind]Empty

sets.MetaGroupKind is a set of metav1.GroupKinds, implemented via map[metav1.GroupKind]struct{} for minimal memory consumption.

func MetaGroupKindKeySet

func MetaGroupKindKeySet(theMap interface{}) MetaGroupKind

MetaGroupKindKeySet creates a MetaGroupKind from a keys of a map[metav1.GroupKind](? extends interface{}). If the value passed in is not actually a map, this will panic.

func NewMetaGroupKind

func NewMetaGroupKind(items ...metav1.GroupKind) MetaGroupKind

NewMetaGroupKind creates a MetaGroupKind from a list of values.

func (MetaGroupKind) Delete

func (s MetaGroupKind) Delete(items ...metav1.GroupKind) MetaGroupKind

Delete removes all items from the set.

func (MetaGroupKind) Difference

func (s MetaGroupKind) Difference(s2 MetaGroupKind) MetaGroupKind

Difference returns a set of objects that are not in s2 For example: s1 = {a1, a2, a3} s2 = {a1, a2, a4, a5} s1.Difference(s2) = {a3} s2.Difference(s1) = {a4, a5}

func (MetaGroupKind) Equal

func (s1 MetaGroupKind) Equal(s2 MetaGroupKind) bool

Equal returns true if and only if s1 is equal (as a set) to s2. Two sets are equal if their membership is identical. (In practice, this means same elements, order doesn't matter)

func (MetaGroupKind) Has

func (s MetaGroupKind) Has(item metav1.GroupKind) bool

Has returns true if and only if item is contained in the set.

func (MetaGroupKind) HasAll

func (s MetaGroupKind) HasAll(items ...metav1.GroupKind) bool

HasAll returns true if and only if all items are contained in the set.

func (MetaGroupKind) HasAny

func (s MetaGroupKind) HasAny(items ...metav1.GroupKind) bool

HasAny returns true if any items are contained in the set.

func (MetaGroupKind) Insert

func (s MetaGroupKind) Insert(items ...metav1.GroupKind) MetaGroupKind

Insert adds items to the set.

func (MetaGroupKind) Intersection

func (s1 MetaGroupKind) Intersection(s2 MetaGroupKind) MetaGroupKind

Intersection returns a new set which includes the item in BOTH s1 and s2 For example: s1 = {a1, a2} s2 = {a2, a3} s1.Intersection(s2) = {a2}

func (MetaGroupKind) IsSuperset

func (s1 MetaGroupKind) IsSuperset(s2 MetaGroupKind) bool

IsSuperset returns true if and only if s1 is a superset of s2.

func (MetaGroupKind) Len

func (s MetaGroupKind) Len() int

Len returns the size of the set.

func (MetaGroupKind) List

func (s MetaGroupKind) List() []metav1.GroupKind

List returns the contents as a sorted metav1.GroupKind slice.

func (MetaGroupKind) PopAny

func (s MetaGroupKind) PopAny() (metav1.GroupKind, bool)

Returns a single element from the set.

func (MetaGroupKind) Union

Union returns a new set which includes items in either s1 or s2. For example: s1 = {a1, a2} s2 = {a3, a4} s1.Union(s2) = {a1, a2, a3, a4} s2.Union(s1) = {a1, a2, a3, a4}

func (MetaGroupKind) UnsortedList

func (s MetaGroupKind) UnsortedList() []metav1.GroupKind

UnsortedList returns the slice with contents in random order.

type MetaGroupVersionKind added in v0.25.0

type MetaGroupVersionKind map[metav1.GroupVersionKind]Empty

sets.MetaGroupVersionKind is a set of metav1.GroupVersionKinds, implemented via map[metav1.GroupVersionKind]struct{} for minimal memory consumption.

func MetaGroupVersionKindKeySet added in v0.25.0

func MetaGroupVersionKindKeySet(theMap interface{}) MetaGroupVersionKind

MetaGroupVersionKindKeySet creates a MetaGroupVersionKind from a keys of a map[metav1.GroupVersionKind](? extends interface{}). If the value passed in is not actually a map, this will panic.

func NewMetaGroupVersionKind added in v0.25.0

func NewMetaGroupVersionKind(items ...metav1.GroupVersionKind) MetaGroupVersionKind

NewMetaGroupVersionKind creates a MetaGroupVersionKind from a list of values.

func (MetaGroupVersionKind) Delete added in v0.25.0

Delete removes all items from the set.

func (MetaGroupVersionKind) Difference added in v0.25.0

Difference returns a set of objects that are not in s2 For example: s1 = {a1, a2, a3} s2 = {a1, a2, a4, a5} s1.Difference(s2) = {a3} s2.Difference(s1) = {a4, a5}

func (MetaGroupVersionKind) Equal added in v0.25.0

Equal returns true if and only if s1 is equal (as a set) to s2. Two sets are equal if their membership is identical. (In practice, this means same elements, order doesn't matter)

func (MetaGroupVersionKind) Has added in v0.25.0

Has returns true if and only if item is contained in the set.

func (MetaGroupVersionKind) HasAll added in v0.25.0

func (s MetaGroupVersionKind) HasAll(items ...metav1.GroupVersionKind) bool

HasAll returns true if and only if all items are contained in the set.

func (MetaGroupVersionKind) HasAny added in v0.25.0

func (s MetaGroupVersionKind) HasAny(items ...metav1.GroupVersionKind) bool

HasAny returns true if any items are contained in the set.

func (MetaGroupVersionKind) Insert added in v0.25.0

Insert adds items to the set.

func (MetaGroupVersionKind) Intersection added in v0.25.0

Intersection returns a new set which includes the item in BOTH s1 and s2 For example: s1 = {a1, a2} s2 = {a2, a3} s1.Intersection(s2) = {a2}

func (MetaGroupVersionKind) IsSuperset added in v0.25.0

IsSuperset returns true if and only if s1 is a superset of s2.

func (MetaGroupVersionKind) Len added in v0.25.0

func (s MetaGroupVersionKind) Len() int

Len returns the size of the set.

func (MetaGroupVersionKind) List added in v0.25.0

List returns the contents as a sorted metav1.GroupVersionKind slice.

func (MetaGroupVersionKind) PopAny added in v0.25.0

Returns a single element from the set.

func (MetaGroupVersionKind) Union added in v0.25.0

Union returns a new set which includes items in either s1 or s2. For example: s1 = {a1, a2} s2 = {a3, a4} s1.Union(s2) = {a1, a2, a3, a4} s2.Union(s1) = {a1, a2, a3, a4}

func (MetaGroupVersionKind) UnsortedList added in v0.25.0

func (s MetaGroupVersionKind) UnsortedList() []metav1.GroupVersionKind

UnsortedList returns the slice with contents in random order.

type NamespacedName

type NamespacedName map[types.NamespacedName]Empty

sets.NamespacedName is a set of types.NamespacedNames, implemented via map[types.NamespacedName]struct{} for minimal memory consumption.

func NamespacedNameKeySet

func NamespacedNameKeySet(theMap interface{}) NamespacedName

NamespacedNameKeySet creates a NamespacedName from a keys of a map[types.NamespacedName](? extends interface{}). If the value passed in is not actually a map, this will panic.

func NewNamespacedName

func NewNamespacedName(items ...types.NamespacedName) NamespacedName

NewNamespacedName creates a NamespacedName from a list of values.

func (NamespacedName) Delete

Delete removes all items from the set.

func (NamespacedName) Difference

func (s NamespacedName) Difference(s2 NamespacedName) NamespacedName

Difference returns a set of objects that are not in s2 For example: s1 = {a1, a2, a3} s2 = {a1, a2, a4, a5} s1.Difference(s2) = {a3} s2.Difference(s1) = {a4, a5}

func (NamespacedName) Equal

func (s1 NamespacedName) Equal(s2 NamespacedName) bool

Equal returns true if and only if s1 is equal (as a set) to s2. Two sets are equal if their membership is identical. (In practice, this means same elements, order doesn't matter)

func (NamespacedName) Has

Has returns true if and only if item is contained in the set.

func (NamespacedName) HasAll

func (s NamespacedName) HasAll(items ...types.NamespacedName) bool

HasAll returns true if and only if all items are contained in the set.

func (NamespacedName) HasAny

func (s NamespacedName) HasAny(items ...types.NamespacedName) bool

HasAny returns true if any items are contained in the set.

func (NamespacedName) Insert

Insert adds items to the set.

func (NamespacedName) Intersection

func (s1 NamespacedName) Intersection(s2 NamespacedName) NamespacedName

Intersection returns a new set which includes the item in BOTH s1 and s2 For example: s1 = {a1, a2} s2 = {a2, a3} s1.Intersection(s2) = {a2}

func (NamespacedName) IsSuperset

func (s1 NamespacedName) IsSuperset(s2 NamespacedName) bool

IsSuperset returns true if and only if s1 is a superset of s2.

func (NamespacedName) Len

func (s NamespacedName) Len() int

Len returns the size of the set.

func (NamespacedName) List

func (s NamespacedName) List() []types.NamespacedName

List returns the contents as a sorted types.NamespacedName slice.

func (NamespacedName) PopAny

func (s NamespacedName) PopAny() (types.NamespacedName, bool)

Returns a single element from the set.

func (NamespacedName) Union

Union returns a new set which includes items in either s1 or s2. For example: s1 = {a1, a2} s2 = {a3, a4} s1.Union(s2) = {a1, a2, a3, a4} s2.Union(s1) = {a1, a2, a3, a4}

func (NamespacedName) UnsortedList

func (s NamespacedName) UnsortedList() []types.NamespacedName

UnsortedList returns the slice with contents in random order.

type OID

type OID map[kmapi.OID]Empty

sets.OID is a set of kmapi.OIDs, implemented via map[kmapi.OID]struct{} for minimal memory consumption.

func NewOID

func NewOID(items ...kmapi.OID) OID

NewOID creates a OID from a list of values.

func OIDKeySet

func OIDKeySet(theMap interface{}) OID

OIDKeySet creates a OID from a keys of a map[kmapi.OID](? extends interface{}). If the value passed in is not actually a map, this will panic.

func (OID) Delete

func (s OID) Delete(items ...kmapi.OID) OID

Delete removes all items from the set.

func (OID) Difference

func (s OID) Difference(s2 OID) OID

Difference returns a set of objects that are not in s2 For example: s1 = {a1, a2, a3} s2 = {a1, a2, a4, a5} s1.Difference(s2) = {a3} s2.Difference(s1) = {a4, a5}

func (OID) Equal

func (s1 OID) Equal(s2 OID) bool

Equal returns true if and only if s1 is equal (as a set) to s2. Two sets are equal if their membership is identical. (In practice, this means same elements, order doesn't matter)

func (OID) Has

func (s OID) Has(item kmapi.OID) bool

Has returns true if and only if item is contained in the set.

func (OID) HasAll

func (s OID) HasAll(items ...kmapi.OID) bool

HasAll returns true if and only if all items are contained in the set.

func (OID) HasAny

func (s OID) HasAny(items ...kmapi.OID) bool

HasAny returns true if any items are contained in the set.

func (OID) Insert

func (s OID) Insert(items ...kmapi.OID) OID

Insert adds items to the set.

func (OID) Intersection

func (s1 OID) Intersection(s2 OID) OID

Intersection returns a new set which includes the item in BOTH s1 and s2 For example: s1 = {a1, a2} s2 = {a2, a3} s1.Intersection(s2) = {a2}

func (OID) IsSuperset

func (s1 OID) IsSuperset(s2 OID) bool

IsSuperset returns true if and only if s1 is a superset of s2.

func (OID) Len

func (s OID) Len() int

Len returns the size of the set.

func (OID) List

func (s OID) List() []kmapi.OID

List returns the contents as a sorted kmapi.OID slice.

func (OID) PopAny

func (s OID) PopAny() (kmapi.OID, bool)

Returns a single element from the set.

func (OID) Union

func (s1 OID) Union(s2 OID) OID

Union returns a new set which includes items in either s1 or s2. For example: s1 = {a1, a2} s2 = {a3, a4} s1.Union(s2) = {a1, a2, a3, a4} s2.Union(s1) = {a1, a2, a3, a4}

func (OID) UnsortedList

func (s OID) UnsortedList() []kmapi.OID

UnsortedList returns the slice with contents in random order.

type ObjectReference

type ObjectReference map[kmapi.ObjectReference]Empty

sets.ObjectReference is a set of kmapi.ObjectReferences, implemented via map[kmapi.ObjectReference]struct{} for minimal memory consumption.

func NewObjectReference

func NewObjectReference(items ...kmapi.ObjectReference) ObjectReference

NewObjectReference creates a ObjectReference from a list of values.

func ObjectReferenceKeySet

func ObjectReferenceKeySet(theMap interface{}) ObjectReference

ObjectReferenceKeySet creates a ObjectReference from a keys of a map[kmapi.ObjectReference](? extends interface{}). If the value passed in is not actually a map, this will panic.

func (ObjectReference) Delete

Delete removes all items from the set.

func (ObjectReference) Difference

Difference returns a set of objects that are not in s2 For example: s1 = {a1, a2, a3} s2 = {a1, a2, a4, a5} s1.Difference(s2) = {a3} s2.Difference(s1) = {a4, a5}

func (ObjectReference) Equal

func (s1 ObjectReference) Equal(s2 ObjectReference) bool

Equal returns true if and only if s1 is equal (as a set) to s2. Two sets are equal if their membership is identical. (In practice, this means same elements, order doesn't matter)

func (ObjectReference) Has

Has returns true if and only if item is contained in the set.

func (ObjectReference) HasAll

func (s ObjectReference) HasAll(items ...kmapi.ObjectReference) bool

HasAll returns true if and only if all items are contained in the set.

func (ObjectReference) HasAny

func (s ObjectReference) HasAny(items ...kmapi.ObjectReference) bool

HasAny returns true if any items are contained in the set.

func (ObjectReference) Insert

Insert adds items to the set.

func (ObjectReference) Intersection

func (s1 ObjectReference) Intersection(s2 ObjectReference) ObjectReference

Intersection returns a new set which includes the item in BOTH s1 and s2 For example: s1 = {a1, a2} s2 = {a2, a3} s1.Intersection(s2) = {a2}

func (ObjectReference) IsSuperset

func (s1 ObjectReference) IsSuperset(s2 ObjectReference) bool

IsSuperset returns true if and only if s1 is a superset of s2.

func (ObjectReference) Len

func (s ObjectReference) Len() int

Len returns the size of the set.

func (ObjectReference) List

List returns the contents as a sorted kmapi.ObjectReference slice.

func (ObjectReference) PopAny

func (s ObjectReference) PopAny() (kmapi.ObjectReference, bool)

Returns a single element from the set.

func (ObjectReference) Union

Union returns a new set which includes items in either s1 or s2. For example: s1 = {a1, a2} s2 = {a3, a4} s1.Union(s2) = {a1, a2, a3, a4} s2.Union(s1) = {a1, a2, a3, a4}

func (ObjectReference) UnsortedList

func (s ObjectReference) UnsortedList() []kmapi.ObjectReference

UnsortedList returns the slice with contents in random order.

Jump to

Keyboard shortcuts

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