Documentation ¶
Index ¶
- type Builder
- func (b *Builder) Build() (*apismaya.CStorVolume, error)
- func (b *Builder) WithAnnotations(annotations map[string]string) *Builder
- func (b *Builder) WithAnnotationsNew(annotations map[string]string) *Builder
- func (b *Builder) WithCapacity(capacity string) *Builder
- func (b *Builder) WithConsistencyFactor(consistencyfactor int) *Builder
- func (b *Builder) WithGenerateName(name string) *Builder
- func (b *Builder) WithIQN(iqn string) *Builder
- func (b *Builder) WithLabels(labels map[string]string) *Builder
- func (b *Builder) WithLabelsNew(labels map[string]string) *Builder
- func (b *Builder) WithName(name string) *Builder
- func (b *Builder) WithNamespace(namespace string) *Builder
- func (b *Builder) WithReplicationFactor(replicationfactor int) *Builder
- func (b *Builder) WithTargetIP(targetip string) *Builder
- func (b *Builder) WithTargetPort(targetport string) *Builder
- func (b *Builder) WithTargetPortal(targetportal string) *Builder
- type CStorVolume
- type CStorVolumeList
- type Kubeclient
- func (k *Kubeclient) Create(vol *apisv1.CStorVolume) (*apisv1.CStorVolume, error)
- func (k *Kubeclient) Delete(name string) error
- func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*apisv1.CStorVolume, error)
- func (k *Kubeclient) GetRaw(name string, opts metav1.GetOptions) ([]byte, error)
- func (k *Kubeclient) List(opts metav1.ListOptions) (*apisv1.CStorVolumeList, error)
- func (k *Kubeclient) WithNamespace(namespace string) *Kubeclient
- type KubeclientBuildOption
- type ListBuilder
- type Predicate
- type PredicateList
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 (*Builder) Build ¶
func (b *Builder) Build() (*apismaya.CStorVolume, error)
Build returns the CStorVolume API instance
func (*Builder) WithAnnotations ¶
WithAnnotations merges existing annotations if any with the ones that are provided here
func (*Builder) WithAnnotationsNew ¶
WithAnnotationsNew resets existing annotations if any with ones that are provided here
func (*Builder) WithCapacity ¶
WithCapacity sets the Capacity field of CStorVolume with provided arguments
func (*Builder) WithConsistencyFactor ¶
WithConsistencyFactor sets the ConsistencyFactor field of CStorVolume with provided arguments
func (*Builder) WithGenerateName ¶
WithGenerateName sets the GenerateName field of CStorVolume with provided value
func (*Builder) WithLabels ¶
WithLabels merges existing labels if any with the ones that are provided here
func (*Builder) WithLabelsNew ¶
WithLabelsNew resets existing labels if any with ones that are provided here
func (*Builder) WithNamespace ¶
WithNamespace sets the Namespace field of CStorVolume provided arguments
func (*Builder) WithReplicationFactor ¶
WithReplicationFactor sets the ReplicationFactor field of CStorVolume with provided arguments
func (*Builder) WithTargetIP ¶
WithTargetIP sets the target IP address field of CStorVolume with provided arguments
func (*Builder) WithTargetPort ¶
WithTargetPort sets the TargetPort field of CStorVolume with provided arguments
func (*Builder) WithTargetPortal ¶
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 ¶
func (k *Kubeclient) List( opts metav1.ListOptions, ) (*apisv1.CStorVolumeList, error)
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
type PredicateList ¶
type PredicateList []Predicate
PredicateList holds a list of cstor volume based predicates