Documentation ¶
Index ¶
- type Builder
- func (b *Builder) Build() (*apis.CStorVolumeAttachment, error)
- func (b *Builder) WithAccessType(accessType string) *Builder
- func (b *Builder) WithCapacity(capacity string) *Builder
- func (b *Builder) WithDevicePath(devicePath string) *Builder
- func (b *Builder) WithFSType(fstype string) *Builder
- func (b *Builder) WithIQN(iqn string) *Builder
- func (b *Builder) WithIscsiInterface(iscsiInterface string) *Builder
- func (b *Builder) WithLabels(labels map[string]string) *Builder
- func (b *Builder) WithLabelsNew(labels map[string]string) *Builder
- func (b *Builder) WithLun(lun string) *Builder
- func (b *Builder) WithMountOptions(mountOptions []string) *Builder
- func (b *Builder) WithMountOptionsNew(mountOptions []string) *Builder
- func (b *Builder) WithName(name string) *Builder
- func (b *Builder) WithNamespace(namespace string) *Builder
- func (b *Builder) WithOwnerNodeID(ownerNodeID string) *Builder
- func (b *Builder) WithReadOnly(readOnly bool) *Builder
- func (b *Builder) WithStagingTargetPath(stagingTargetPath string) *Builder
- func (b *Builder) WithTargetPortal(targetPortal string) *Builder
- func (b *Builder) WithVolName(volName string) *Builder
- type CStorVolumeAttachment
- type CStorVolumeAttachmentList
- type Kubeclient
- func (k *Kubeclient) Create(vol *apis.CStorVolumeAttachment) (*apis.CStorVolumeAttachment, error)
- func (k *Kubeclient) Delete(name string) error
- func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*apis.CStorVolumeAttachment, error)
- func (k *Kubeclient) GetRaw(name string, opts metav1.GetOptions) ([]byte, error)
- func (k *Kubeclient) List(opts metav1.ListOptions) (*apis.CStorVolumeAttachmentList, error)
- func (k *Kubeclient) Update(vol *apis.CStorVolumeAttachment) (*apis.CStorVolumeAttachment, error)
- func (k *Kubeclient) WithNamespace(namespace string) *Kubeclient
- type KubeclientBuildOption
- type ListBuilder
- type Predicate
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 CStorVolumeAttachment
func BuildFrom ¶
func BuildFrom(volume *apis.CStorVolumeAttachment) *Builder
BuildFrom returns new instance of Builder from the provided api instance
func (*Builder) Build ¶
func (b *Builder) Build() (*apis.CStorVolumeAttachment, error)
Build returns csi volume API object
func (*Builder) WithAccessType ¶
WithAccessType sets the accessType of csi volume i.e. block or mount
func (*Builder) WithCapacity ¶
WithCapacity sets the Capacity of csi volume by converting string capacity into Quantity
func (*Builder) WithDevicePath ¶
WithDevicePath sets the devicePath of csi volume
func (*Builder) WithFSType ¶
WithFSType sets the fstype of csi volume
func (*Builder) WithIscsiInterface ¶
WithIscsiInterface sets the iscsiInterface of csi volume
func (*Builder) WithLabels ¶
WithLabels merges existing labels of csi volume if any with the ones that are provided here
func (*Builder) WithLabelsNew ¶
WithLabelsNew resets existing labels of csi volume if any with ones that are provided here
func (*Builder) WithMountOptions ¶
WithMountOptions sets the mountoptions of csi volume
func (*Builder) WithMountOptionsNew ¶
WithMountOptionsNew sets the mountoptions of csi volume
func (*Builder) WithNamespace ¶
WithNamespace sets the namespace of csi volume
func (*Builder) WithOwnerNodeID ¶
WithOwnerNodeID sets the ownerNodeID of csi volume
func (*Builder) WithReadOnly ¶
WithReadOnly sets the readOnly property of csi volume
func (*Builder) WithStagingTargetPath ¶
WithStagingTargetPath sets the stagingTargetpath of csi volume
func (*Builder) WithTargetPortal ¶
WithTargetPortal sets the TargetPortal of csi volume
func (*Builder) WithVolName ¶
WithVolName sets the VolName of csi volume
type CStorVolumeAttachment ¶
type CStorVolumeAttachment struct {
Object *apis.CStorVolumeAttachment
}
CStorVolumeAttachment is a wrapper over CStorVolumeAttachment API instance
func From ¶
func From(vol *apis.CStorVolumeAttachment) *CStorVolumeAttachment
From returns a new instance of csi volume
func (*CStorVolumeAttachment) GetAPIObject ¶
func (p *CStorVolumeAttachment) GetAPIObject() *apis.CStorVolumeAttachment
GetAPIObject returns csi volume's API instance
func (*CStorVolumeAttachment) HasLabel ¶
func (p *CStorVolumeAttachment) HasLabel(key, value string) bool
HasLabel returns true if provided label is present in the provided CStorVolumeAttachment instance
func (*CStorVolumeAttachment) IsNil ¶
func (p *CStorVolumeAttachment) IsNil() bool
IsNil returns true if the csi volume instance is nil
type CStorVolumeAttachmentList ¶
type CStorVolumeAttachmentList struct {
List apis.CStorVolumeAttachmentList
}
CStorVolumeAttachmentList holds the list of csi volume instances
func (*CStorVolumeAttachmentList) Len ¶
func (p *CStorVolumeAttachmentList) Len() int
Len returns the number of items present in the CStorVolumeAttachmentList
type Kubeclient ¶
type Kubeclient struct {
// contains filtered or unexported fields
}
Kubeclient enables kubernetes API operations on csi volume instance
func NewKubeclient ¶
func NewKubeclient(opts ...KubeclientBuildOption) *Kubeclient
NewKubeclient returns a new instance of kubeclient meant for csi volume operations
func (*Kubeclient) Create ¶
func (k *Kubeclient) Create(vol *apis.CStorVolumeAttachment) (*apis.CStorVolumeAttachment, error)
Create creates a csi volume instance in kubernetes cluster
func (*Kubeclient) Delete ¶
func (k *Kubeclient) Delete(name string) error
Delete deletes the csi volume from kubernetes
func (*Kubeclient) Get ¶
func (k *Kubeclient) Get( name string, opts metav1.GetOptions, ) (*apis.CStorVolumeAttachment, error)
Get returns csi volume object for given name
func (*Kubeclient) GetRaw ¶
func (k *Kubeclient) GetRaw( name string, opts metav1.GetOptions, ) ([]byte, error)
GetRaw returns csi volume instance in bytes
func (*Kubeclient) List ¶
func (k *Kubeclient) List(opts metav1.ListOptions) (*apis.CStorVolumeAttachmentList, error)
List returns a list of csi volume instances present in kubernetes cluster
func (*Kubeclient) Update ¶
func (k *Kubeclient) Update(vol *apis.CStorVolumeAttachment) (*apis.CStorVolumeAttachment, error)
Update updates this csi volume instance against 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 CStorVolumeAttachmentList
func ListBuilderFrom ¶
func ListBuilderFrom(vols apis.CStorVolumeAttachmentList) *ListBuilder
ListBuilderFrom returns a new instance of ListBuilder from API list instance
func NewListBuilder ¶
func NewListBuilder() *ListBuilder
NewListBuilder returns a new instance of ListBuilder
func (*ListBuilder) List ¶
func (b *ListBuilder) List() *apis.CStorVolumeAttachmentList
List returns the list of pod instances that was built by this builder
func (*ListBuilder) WithFilter ¶
func (b *ListBuilder) WithFilter(pred ...Predicate) *ListBuilder
WithFilter add filters on which the pod has to be filtered
type Predicate ¶
type Predicate func(*CStorVolumeAttachment) bool
Predicate defines an abstraction to determine conditional checks against the provided pod instance
func HasLabel ¶
HasLabel returns true if provided label is present in the provided CStorVolumeAttachment instance