client

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const PollInterval = 50 * time.Millisecond

Variables

Functions

func ColouredName added in v0.0.2

func ColouredName(key ObjectKey, color *color.Color) string

func Name

func Name(key ObjectKey) string

func PatchObject

func PatchObject(actual, expected runtime.Object) (runtime.Object, error)

func WaitForDeletion added in v0.2.8

func WaitForDeletion(ctx context.Context, client Client, object Object) error

Types

type Client

type Client interface {
	// Get retrieves an obj for the given object key from the Kubernetes Cluster.
	// obj must be a struct pointer so that obj can be updated with the response
	// returned by the Server.
	Get(ctx context.Context, key ObjectKey, obj Object, opts ...GetOption) error

	// List retrieves list of objects for a given namespace and list options. On a
	// successful call, Items field in the list will be populated with the
	// result returned from the server.
	List(ctx context.Context, list ObjectList, opts ...ListOption) error

	// Create saves the object obj in the Kubernetes cluster. obj must be a
	// struct pointer so that obj can be updated with the content returned by the Server.
	Create(ctx context.Context, obj Object, opts ...CreateOption) error

	// Update updates the given obj in the Kubernetes cluster. obj must be a
	// struct pointer so that obj can be updated with the content returned by the Server.
	Update(ctx context.Context, obj Object, opts ...UpdateOption) error

	// Delete deletes the given obj from Kubernetes cluster.
	Delete(ctx context.Context, obj Object, opts ...DeleteOption) error

	// Patch patches the given obj in the Kubernetes cluster. obj must be a
	// struct pointer so that obj can be updated with the content returned by the Server.
	Patch(ctx context.Context, obj Object, patch Patch, opts ...PatchOption) error

	// IsObjectNamespaced returns true if the GroupVersionKind of the object is namespaced.
	IsObjectNamespaced(obj runtime.Object) (bool, error)

	// RESTMapper returns the rest this client is using.
	RESTMapper() meta.RESTMapper
}

type CreateOption added in v0.2.8

type CreateOption = ctrlclient.CreateOption

type DeleteOption added in v0.2.8

type DeleteOption = ctrlclient.DeleteOption

type GetOption added in v0.2.8

type GetOption = ctrlclient.GetOption

type InNamespace added in v0.2.8

type InNamespace = ctrlclient.InNamespace

type ListOption added in v0.2.8

type ListOption = ctrlclient.ListOption

type MatchingLabels added in v0.2.8

type MatchingLabels = ctrlclient.MatchingLabels

type Object added in v0.2.8

type Object = ctrlclient.Object

type ObjectKey

type ObjectKey = ctrlclient.ObjectKey

func Key added in v0.2.8

func Key(obj metav1.Object) ObjectKey

type ObjectList added in v0.2.8

type ObjectList = ctrlclient.ObjectList

type Patch added in v0.2.8

type Patch = ctrlclient.Patch

type PatchOption added in v0.2.8

type PatchOption = ctrlclient.PatchOption

type PropagationPolicy added in v0.2.8

type PropagationPolicy = ctrlclient.PropagationPolicy

type UpdateOption added in v0.2.8

type UpdateOption = ctrlclient.UpdateOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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