live

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ResourceSeparator = []byte("\n---\n")

Functions

func WrapInventoryObj

func WrapInventoryObj(info *resource.Info) inventory.Inventory

WrapInventoryObj takes a passed ResourceGroup (as a resource.Info), wraps it with the InventoryResourceGroup and upcasts the wrapper as an the Inventory interface.

Types

type InventoryResourceGroup

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

InventoryResourceGroup wraps a ResourceGroup resource and implements the Inventory interface. This wrapper loads and stores the object metadata (inventory) to and from the wrapped ResourceGroup.

func (*InventoryResourceGroup) GetObject

func (icm *InventoryResourceGroup) GetObject() (*resource.Info, error)

GetObject returns the wrapped object (ResourceGroup) as a resource.Info or an error if one occurs.

func (*InventoryResourceGroup) Load

Load is an Inventory interface function returning the set of object metadata from the wrapped ResourceGroup, or an error.

func (*InventoryResourceGroup) Store

func (icm *InventoryResourceGroup) Store(objMetas []object.ObjMetadata) error

Store is an Inventory interface function implemented to store the object metadata in the wrapped ResourceGroup. Actual storing happens in "GetObject".

type ResourceGroupPathManifestReader added in v0.35.0

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

ResourceGroupPathManifestReader encapsulates the default path manifest reader.

func (*ResourceGroupPathManifestReader) Read added in v0.35.0

Read reads the manifests and returns them as Info objects. Generates and adds a ResourceGroup inventory object from Kptfile data.

type ResourceGroupProvider added in v0.35.0

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

ResourceGroupProvider implements the Provider interface, returning ResourceGroup versions of some kpt live apply structures.

func NewResourceGroupProvider added in v0.35.0

func NewResourceGroupProvider(f util.Factory) *ResourceGroupProvider

NewResourceGroupProvider encapsulates the passed values, and returns a pointer to an ResourceGroupProvider.

func (*ResourceGroupProvider) Factory added in v0.35.0

func (f *ResourceGroupProvider) Factory() util.Factory

Factory returns the kubectl factory.

func (*ResourceGroupProvider) InventoryClient added in v0.35.0

func (f *ResourceGroupProvider) InventoryClient() (inventory.InventoryClient, error)

InventoryClient returns the InventoryClient created using the ResourceGroup inventory object wrapper function.

func (*ResourceGroupProvider) ManifestReader added in v0.35.0

func (f *ResourceGroupProvider) ManifestReader(reader io.Reader, args []string) (manifestreader.ManifestReader, error)

ManifestReader returns the ResourceGroup inventory object version of the ManifestReader.

func (*ResourceGroupProvider) ToRESTMapper added in v0.35.0

func (f *ResourceGroupProvider) ToRESTMapper() (meta.RESTMapper, error)

ToRESTMapper returns the RESTMapper or an erro if one occurred.

type ResourceGroupStreamManifestReader added in v0.35.0

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

ResourceGroupStreamManifestReader encapsulates the default stream manifest reader.

func (*ResourceGroupStreamManifestReader) Read added in v0.35.0

Read reads the manifests and returns them as Info objects. Transforms the Kptfile into the ResourceGroup inventory object, and appends it to the rest of the standard StreamManifestReader generated objects. Returns an error if one occurs. If the ResourceGroup inventory object does not exist, it is NOT an error.

Jump to

Keyboard shortcuts

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