v1alpha2

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasAnnotation

func HasAnnotation(key, value string) predicate

HasAnnotation returns true if provided annotation key and value are present in the provided CSP instance

func IsNotUID

func IsNotUID(uids ...string) predicate

IsNotUID returns true if provided csp instance's UID does not match with any of the provided UIDs

func ListBuilder

func ListBuilder() *listBuilder

ListBuilder returns a new instance of listBuilder object

func TemplateFunctions

func TemplateFunctions() template.FuncMap

TemplateFunctions exposes a few functions as go template functions

Types

type CSPList

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

CSPList holds the list of cstorpools

func (*CSPList) Filter

func (l *CSPList) Filter(p ...predicate) *CSPList

Filter will filter the csp instances if all the predicates succeed against that csp.

func (*CSPList) GetPoolUIDs

func (l *CSPList) GetPoolUIDs() []string

GetPoolUIDs retuns the UIDs of the pools available in the list

type Kubeclient

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

Kubeclient enables kubernetes API operations on CStorPool instance

func NewKubeClient

func NewKubeClient(opts ...KubeclientBuildOption) *Kubeclient

NewKubeClient returns a new instance of kubeclient meant for CStorPool related operations

func (*Kubeclient) Create

func (k *Kubeclient) Create(obj *apis.CStorPool) (*apis.CStorPool, error)

Create creates an CStorPool instance in kubernetes cluster

func (*Kubeclient) Delete

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

Delete deletes CStorPool instance

func (*Kubeclient) Get

func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*apis.CStorPool, error)

Get returns an CStorPool instance from kubernetes cluster

func (*Kubeclient) List

List returns a list of CStorPool instances present in kubernetes cluster

func (*Kubeclient) Patch

func (k *Kubeclient) Patch(name string, pt types.PatchType,
	patchObj []byte) (*apis.CStorPool, error)

Patch returns the patched CStorPool instance

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 kubernetes clientset against the kubeclient instance

Jump to

Keyboard shortcuts

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