client

package
v0.39.3 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReplaceOwningInventoryID

func ReplaceOwningInventoryID(obj *unstructured.Unstructured, oldID, newID string) (bool, error)

ReplaceOwningInventoryID updates the object owning inventory annotation to the new ID when the owning inventory annotation is either empty or the old ID. It returns true if the annotation is updated.

func UpdateLabelsAndAnnotations

func UpdateLabelsAndAnnotations(obj *unstructured.Unstructured, labels, annotations map[string]string) error

UpdateLabelsAndAnnotations updates .metadata.labels and .metadata.annotations fields of obj to use the passed in labels and annotations. It also updates the last-applied-configuration annotations.

Types

type Client

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

Client is the client to update object in the API server.

func NewClient

func NewClient(d dynamic.Interface, mapper meta.RESTMapper) *Client

NewClient returns a client to get and update an object.

func (*Client) Get

Get fetches the requested object into the input obj using dynamic client

func (*Client) Update

Update updates an object using dynamic client

Jump to

Keyboard shortcuts

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