Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NotFoundErr = func(resourceType ezkube.ResourceId, id ezkube.ResourceId) error { return eris.Errorf("%T with id %v not found", resourceType, Key(id)) }
Functions ¶
func Key ¶
func Key(id ezkube.ResourceId) string
k8s resources are uniquely identified by their name and namespace
func TypedKey ¶ added in v0.7.17
func TypedKey(id ezkube.ResourceId) string
typed keys are helpful for logging; currently unused in the Set implementation but placed here for convenience
Types ¶
type ResourceDelta ¶ added in v0.7.17
type ResourceDelta struct { // the resources inserted into the set Inserted ResourceSet // the resources removed from the set Removed ResourceSet }
ResourceDelta represents the set of changes between two ResourceSets.
type ResourceSet ¶
type ResourceSet interface { Keys() sets.String List(filterResource ...func(ezkube.ResourceId) bool) []ezkube.ResourceId Map() map[string]ezkube.ResourceId Insert(resource ...ezkube.ResourceId) Equal(set ResourceSet) bool Has(resource ezkube.ResourceId) bool Delete(resource ezkube.ResourceId) Union(set ResourceSet) ResourceSet Difference(set ResourceSet) ResourceSet Intersection(set ResourceSet) ResourceSet Find(resourceType, id ezkube.ResourceId) (ezkube.ResourceId, error) Length() int // returns the delta between this and and another ResourceSet Delta(newSet ResourceSet) ResourceDelta }
func NewResourceSet ¶
func NewResourceSet(resources ...ezkube.ResourceId) ResourceSet
Click to show internal directories.
Click to hide internal directories.