v1alpha1

package
v0.0.0-...-a88c85e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

Builder enables building an instance of snapshot

func NewBuilder

func NewBuilder() *Builder

NewBuilder returns new instance of Builder

func (*Builder) Build

func (b *Builder) Build() (*snapshot.VolumeSnapshot, error)

Build returns the snapshot API instance

func (*Builder) WithName

func (b *Builder) WithName(name string) *Builder

WithName sets the Name field of snapshot with provided argument.

func (*Builder) WithNamespace

func (b *Builder) WithNamespace(namespace string) *Builder

WithNamespace sets the Namespace field of snapshot with provided value.

func (*Builder) WithPVC

func (b *Builder) WithPVC(pvc string) *Builder

WithPVC sets the PVC field of snapshot with provided value.

type KubeClientBuildOption

type KubeClientBuildOption func(*Kubeclient)

KubeClientBuildOption defines the abstraction to build a kubeclient instance

func WithClientSet

WithClientSet sets the kubernetes client against the kubeclient instance

func WithKubeConfigPath

func WithKubeConfigPath(path string) KubeClientBuildOption

WithKubeConfigPath sets the kubeConfig path against client instance

type Kubeclient

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

Kubeclient enables kubernetes API operations on snapshot instance

func NewKubeClient

func NewKubeClient(opts ...KubeClientBuildOption) *Kubeclient

NewKubeClient returns a new instance of kubeclient meant for snapshot

func (*Kubeclient) Create

Create creates and returns a snapshot instance

func (*Kubeclient) Delete

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

Delete deletes the snapshot if present in kubernetes cluster

func (*Kubeclient) Get

Get return a snapshot instance present in kubernetes cluster

func (*Kubeclient) List

List returns a list of snapshot instances present in kubernetes cluster

func (*Kubeclient) ListRaw

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

ListRaw returns volumesnapshot object for given name in byte format

func (*Kubeclient) WithNamespace

func (k *Kubeclient) WithNamespace(namespace string) *Kubeclient

WithNamespace sets the kubernetes client against the provided namespace

type Predicate

type Predicate func(*Snapshot) bool

Predicate defines an abstraction to determine conditional checks against the provided Snapshot instance

type Snapshot

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

Snapshot is a wrapper over API based volume snapshot instance

func NewForAPIObject

func NewForAPIObject(obj *snapshot.VolumeSnapshot) *Snapshot

NewForAPIObject returns a new instance of Snapshot

type SnapshotList

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

SnapshotList holds the list of Snapshot instances

func (*SnapshotList) Len

func (p *SnapshotList) Len() int

Len returns the number of items present in the SnapshotList

Jump to

Keyboard shortcuts

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