ensure

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const ObjectHashKey = "cuebectl/object-hash"

Variables

This section is empty.

Functions

func EqualHash added in v0.2.0

func EqualHash(in, existing *unstructured.Unstructured) bool

func HashUnstructured added in v0.2.0

func HashUnstructured(u *unstructured.Unstructured) error

HashUnstructured writes specified object to hash using the spew library which follows pointers and prints actual values of the nested objects ensuring the hash does not change when a pointer changes.

Types

type DynamicUnstructuredEnsurer

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

DynamicUnstructuredEnsurer uses a dynamic client to provide ensure.Interface

func NewDynamicUnstructuredEnsurer

func NewDynamicUnstructuredEnsurer(client dynamic.Interface, mapper meta.RESTMapper, cache cache.Interface) *DynamicUnstructuredEnsurer

NewDynamicUnstructuredEnsurer constructs a an ensurer from a dynamic.Interface and RESTMapper

func (*DynamicUnstructuredEnsurer) EnsureUnstructured

func (e *DynamicUnstructuredEnsurer) EnsureUnstructured(in *unstructured.Unstructured) (out *unstructured.Unstructured, locator identity.Locator, err error)

type Interface

type Interface interface {
	// Ensure takes an unstructured object and ensures that it is either created or updated on the cluster, returning
	// the updated object or an error.
	// It should be used for resources that have been concreted via cue instance / cluster reconciliation
	EnsureUnstructured(*unstructured.Unstructured) (*unstructured.Unstructured, identity.Locator, error)
}

Jump to

Keyboard shortcuts

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