Documentation ¶
Index ¶
- type Builder
- type KubeClientBuildOption
- type Kubeclient
- func (k *Kubeclient) Create(snap *snapshot.VolumeSnapshot) (*snapshot.VolumeSnapshot, error)
- func (k *Kubeclient) Delete(name string, opts *metav1.DeleteOptions) error
- func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*snapshot.VolumeSnapshot, error)
- func (k *Kubeclient) List(opts metav1.ListOptions) (*snapshot.VolumeSnapshotList, error)
- func (k *Kubeclient) ListRaw(opts metav1.ListOptions) ([]byte, error)
- func (k *Kubeclient) WithNamespace(namespace string) *Kubeclient
- type Predicate
- type Snapshot
- type SnapshotList
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 (*Builder) Build ¶
func (b *Builder) Build() (*snapshot.VolumeSnapshot, error)
Build returns the snapshot API instance
func (*Builder) WithNamespace ¶
WithNamespace sets the Namespace field of snapshot with provided value.
type KubeClientBuildOption ¶
type KubeClientBuildOption func(*Kubeclient)
KubeClientBuildOption defines the abstraction to build a kubeclient instance
func WithClientSet ¶
func WithClientSet(c *clientset.OpenebsV1alpha1Client) KubeClientBuildOption
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 ¶
func (k *Kubeclient) Create(snap *snapshot.VolumeSnapshot) (*snapshot.VolumeSnapshot, error)
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 ¶
func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*snapshot.VolumeSnapshot, error)
Get return a snapshot instance present in kubernetes cluster
func (*Kubeclient) List ¶
func (k *Kubeclient) List(opts metav1.ListOptions) (*snapshot.VolumeSnapshotList, error)
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 ¶
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