v1

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 ErrMissingResource = errors.New("resource not found")

ErrMissingResource is returned when the resource is not found.

Functions

func NewResourceLoadError

func NewResourceLoadError(resource string, err error) error

NewResourceLoadError creates a `ResourceLoadError`.

Types

type CoreV1

type CoreV1 struct {
	v1.CoreV1Interface
	// contains filtered or unexported fields
}

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

func NewCoreV1

func NewCoreV1(kubeClient kubernetes.Interface, options *options.Client) *CoreV1

NewCoreV1 creates `CoreV1`.

func (*CoreV1) ConfigMapData

func (corev1 *CoreV1) ConfigMapData(resource string) (map[string]string, error)

ConfigMapData returns a map of key/value pairs given a config map.

func (*CoreV1) NamespaceList

func (corev1 *CoreV1) NamespaceList() ([]string, error)

NamespaceList returns all namespaces in a cluster.

func (*CoreV1) Pod

func (corev1 *CoreV1) Pod(resource string) *result.Result

Pod returns a single resource in a given namespace with the given name.

func (*CoreV1) PodList

func (corev1 *CoreV1) PodList() ([]string, error)

PodList returns a list of pods.

func (*CoreV1) SecretData

func (corev1 *CoreV1) SecretData(resource string) (map[string]string, error)

SecretData returns a map of key/value pairs given a secret.

type ResourceLoadError

type ResourceLoadError struct {
	Err      error
	Resource string
}

ResourceLoadError wraps API errors when a resource is not found.

func (*ResourceLoadError) Error

func (e *ResourceLoadError) Error() string

Error returns the message on the internal error (if there is one).

func (*ResourceLoadError) Unwrap

func (e *ResourceLoadError) Unwrap() error

Unwrap returns the internal error.

Jump to

Keyboard shortcuts

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