client

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAPIGroup = errors.New("api group error")

ErrAPIGroup is returned when a kubernetes api call fails.

View Source
var ErrMissingResource = errors.New("resource not found")

ErrMissingResource is returned when the resource is not found.

Functions

This section is empty.

Types

type Client

type Client struct {
	kubernetes.Interface

	Error error
	// contains filtered or unexported fields
}

Client is used to interact with the kubernetes API.

func NewClient added in v1.1.1

func NewClient(configures ...ConfigureFunc) *Client

NewClient creates `Client` from a kubernetes client.

func (*Client) AppsV1 added in v1.2.0

func (client *Client) AppsV1() *appsv1.AppsV1

AppsV1 is used to interact with features provided by the apps group.

func (*Client) BatchV1 added in v1.2.0

func (client *Client) BatchV1() *batchv1.BatchV1

BatchV1 is used to interact with features provided by the batch group.

func (*Client) BatchV1Beta1 added in v1.2.0

func (client *Client) BatchV1Beta1() *batchv1beta1.BatchV1Beta1

BatchV1Beta1 is used to interact with features provided by the batch group.

func (*Client) CoreV1 added in v1.2.0

func (client *Client) CoreV1() *corev1.CoreV1

CoreV1 is used to interact with features provided by the core group.

func (*Client) GetAPIGroup added in v1.1.1

func (client *Client) GetAPIGroup(resource string) (string, error)

GetAPIGroup returns the GroupVersion (batch/v1, batch/v1beta1, etc) for the given resource.

type ConfigureFunc added in v1.2.0

type ConfigureFunc = func(client *Client)

ConfigureFunc is used for configuring `Client` settings.

func WithExport added in v1.2.0

func WithExport(shouldExport bool) ConfigureFunc

WithExport flags the client to include `export` statements in the output.

func WithKubeClient added in v1.2.0

func WithKubeClient(kubeClient kubernetes.Interface) ConfigureFunc

WithKubeClient sets the underlying kubernetes API client.

func WithNamespace added in v1.2.0

func WithNamespace(namespace string) ConfigureFunc

WithNamespace sets the namespace to use when interacting with the Kubernetes API.

Directories

Path Synopsis
apps
v1
batch
v1
core
v1

Jump to

Keyboard shortcuts

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