v1alpha1

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: Apache-2.0 Imports: 7 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 is the builder object for CStorVolume

func NewBuilder

func NewBuilder() *Builder

NewBuilder returns new instance of Builder

func (*Builder) Build

func (b *Builder) Build() (*apismaya.CStorVolume, error)

Build returns the CStorVolume API instance

func (*Builder) WithAnnotations

func (b *Builder) WithAnnotations(annotations map[string]string) *Builder

WithAnnotations merges existing annotations if any with the ones that are provided here

func (*Builder) WithAnnotationsNew

func (b *Builder) WithAnnotationsNew(annotations map[string]string) *Builder

WithAnnotationsNew resets existing annotations if any with ones that are provided here

func (*Builder) WithCapacity

func (b *Builder) WithCapacity(capacity string) *Builder

WithCapacity sets the Capacity field of CStorVolume with provided arguments

func (*Builder) WithConsistencyFactor

func (b *Builder) WithConsistencyFactor(consistencyfactor int) *Builder

WithConsistencyFactor sets the ConsistencyFactor field of CStorVolume with provided arguments

func (*Builder) WithGenerateName

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

WithGenerateName sets the GenerateName field of CStorVolume with provided value

func (*Builder) WithIQN

func (b *Builder) WithIQN(iqn string) *Builder

WithIQN sets the IQN field of CStorVolume with provided arguments

func (*Builder) WithLabels

func (b *Builder) WithLabels(labels map[string]string) *Builder

WithLabels merges existing labels if any with the ones that are provided here

func (*Builder) WithLabelsNew

func (b *Builder) WithLabelsNew(labels map[string]string) *Builder

WithLabelsNew resets existing labels if any with ones that are provided here

func (*Builder) WithName

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

WithName sets the Name field of CStorVolume with provided value.

func (*Builder) WithNamespace

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

WithNamespace sets the Namespace field of CStorVolume provided arguments

func (*Builder) WithReplicationFactor

func (b *Builder) WithReplicationFactor(replicationfactor int) *Builder

WithReplicationFactor sets the ReplicationFactor field of CStorVolume with provided arguments

func (*Builder) WithTargetIP

func (b *Builder) WithTargetIP(targetip string) *Builder

WithTargetIP sets the target IP address field of CStorVolume with provided arguments

func (*Builder) WithTargetPort

func (b *Builder) WithTargetPort(targetport string) *Builder

WithTargetPort sets the TargetPort field of CStorVolume with provided arguments

func (*Builder) WithTargetPortal

func (b *Builder) WithTargetPortal(targetportal string) *Builder

WithTargetPortal sets the TargetPortal field of CStorVolume with provided arguments

type CStorVolume

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

CStorVolume a wrapper for CStorVolume object

func NewForAPIObject

func NewForAPIObject(obj *v1apis.CStorVolume) *CStorVolume

NewForAPIObject returns a new instance of cstorvolume

func (*CStorVolume) IsHealthy

func (p *CStorVolume) IsHealthy() bool

IsHealthy returns true if the CVR is in healthy state

type CStorVolumeList

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

CStorVolumeList is a list of cstorvolume objects

func (*CStorVolumeList) Len

func (l *CStorVolumeList) Len() int

Len returns the number of items present in the CStorVolumeList

type Kubeclient

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

Kubeclient enables kubernetes API operations on cstor volume replica instance

func NewKubeclient

func NewKubeclient(opts ...KubeclientBuildOption) *Kubeclient

NewKubeclient returns a new instance of kubeclient meant for cstor volume replica operations

func (*Kubeclient) Create

func (k *Kubeclient) Create(vol *apisv1.CStorVolume) (*apisv1.CStorVolume, error)

Create creates the cstorvolume resource

func (*Kubeclient) Delete

func (k *Kubeclient) Delete(name string) error

Delete deletes the cstorvolume resource

func (*Kubeclient) Get

func (k *Kubeclient) Get(
	name string,
	opts metav1.GetOptions,
) (*apisv1.CStorVolume, error)

Get returns deployment object for given name

func (*Kubeclient) GetRaw

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

GetRaw returns a raw CStor volume instance

func (*Kubeclient) List

List returns a list of cstor volume replica instances present in kubernetes cluster

func (*Kubeclient) WithNamespace

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

WithNamespace sets the provided namespace against this Kubeclient 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 client against the kubeclient instance

func WithKubeConfigPath

func WithKubeConfigPath(path string) KubeclientBuildOption

WithKubeConfigPath sets the kubernetes client against the provided path

func WithNamespace

func WithNamespace(namespace string) KubeclientBuildOption

WithNamespace sets the kubernetes client against the provided namespace

type ListBuilder

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

ListBuilder enables building an instance of CstorVolumeList

func NewListBuilder

func NewListBuilder() *ListBuilder

NewListBuilder returns a new instance of listBuilder

func (*ListBuilder) List

func (b *ListBuilder) List() *CStorVolumeList

List returns the list of cstorvolume (cv) instances that was built by this builder

func (*ListBuilder) WithAPIList

func (b *ListBuilder) WithAPIList(list *v1apis.CStorVolumeList) *ListBuilder

WithAPIList builds the list of cstorvolume instances based on the provided cstorvolume api instances

func (*ListBuilder) WithFilter

func (b *ListBuilder) WithFilter(pred ...Predicate) *ListBuilder

WithFilter adds filters on which the cstorvolume has to be filtered

type Predicate

type Predicate func(*CStorVolume) bool

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

func IsHealthy

func IsHealthy() Predicate

IsHealthy is a predicate to filter out cstorvolumes which is healthy

type PredicateList

type PredicateList []Predicate

PredicateList holds a list of cstor volume based predicates

Jump to

Keyboard shortcuts

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