v1alpha1

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kubeclient

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

Kubeclient enables kubernetes API operations on volumesnapshotdata instance

func NewKubeClient

func NewKubeClient(opts ...KubeclientBuildOption) *Kubeclient

NewKubeClient returns a new instance of kubeclient meant for snapshot data

func (*Kubeclient) Delete

func (k *Kubeclient) Delete(name string, opts *metav1.DeleteOptions) error

Delete deletes the snapshotdata if present in kubernetes cluster

func (*Kubeclient) Get

Get return a volumesnapshotdata instance present in kubernetes cluster

func (*Kubeclient) GetRaw

func (k *Kubeclient) GetRaw(name string, opts metav1.GetOptions) ([]byte, error)

GetRaw gets volumesnapshotdata object for a given name present in kubernetes cluster and returns result in raw byte.

func (*Kubeclient) List

List returns a list of volumesnapshotdata instances present in kubernetes cluster

func (*Kubeclient) ListRaw

func (k *Kubeclient) ListRaw(opts metav1.ListOptions) ([]byte, error)

ListRaw returns volumesnapshotdata object for given name in byte format

func (*Kubeclient) Patch

func (k *Kubeclient) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*snapshotapi.VolumeSnapshotData, error)

Patch patches the snapshotdata if present in kubernetes cluster

type KubeclientBuildOption

type KubeclientBuildOption func(*Kubeclient)

KubeclientBuildOption defines the abstraction to build a kubeclient instance

func WithClientSet

func WithClientSet(c *clientset.Clientset) KubeclientBuildOption

WithClientSet sets the snapshot client against the kubeclient instance

func WithKubeConfigPath

func WithKubeConfigPath(kubeConfigPath string) KubeclientBuildOption

WithKubeConfigPath sets the kubeConfig path against client instance

Jump to

Keyboard shortcuts

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