client

package
v0.0.0-...-cfb26ff Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
	Get(ctx context.Context, key ObjectKey, objExisting client.Object, opts ...client.GetOption) error
	Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
	Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
	List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
}

Client is a wrapper around the raw kube client provided by operator-sdk. Using the wrapper facilitates mocking of client interactions with the cluster, while using fakeclient during unit testing. TODO(tflannag): Should this be removed entirely in favor of c-r's dynamic client?

func NewClient

func NewClient(client client.Client) Client

NewClient returns a kubeClient that can perform create, get and update operations on a runtime object

type ObjectKey

type ObjectKey = types.NamespacedName

ObjectKey identifies a Kubernetes Object.

Jump to

Keyboard shortcuts

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