sets

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: Apache-2.0 Imports: 5 Imported by: 130

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 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
}

func NewResourceSet

func NewResourceSet(resources ...ezkube.ResourceId) ResourceSet

Jump to

Keyboard shortcuts

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