Documentation ¶
Index ¶
- type Builder
- type Kubeclient
- func (k *Kubeclient) Create(vol *apis.ZFSSnapshot) (*apis.ZFSSnapshot, error)
- func (k *Kubeclient) Delete(name string) error
- func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*apis.ZFSSnapshot, error)
- func (k *Kubeclient) GetRaw(name string, opts metav1.GetOptions) ([]byte, error)
- func (k *Kubeclient) List(opts metav1.ListOptions) (*apis.ZFSSnapshotList, error)
- func (k *Kubeclient) Update(vol *apis.ZFSSnapshot) (*apis.ZFSSnapshot, error)
- func (k *Kubeclient) WithNamespace(namespace string) *Kubeclient
- type KubeclientBuildOption
- type ListBuilder
- type Predicate
- type ZFSSnapshot
- type ZFSSnapshotList
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 ZFSSnapshot
func BuildFrom ¶
func BuildFrom(snap *apis.ZFSSnapshot) *Builder
BuildFrom returns new instance of Builder from the provided api instance
func (*Builder) Build ¶
func (b *Builder) Build() (*apis.ZFSSnapshot, error)
Build returns ZFSSnapshot API object
func (*Builder) WithFinalizer ¶
WithFinalizer merge existing finalizers if any with the ones that are provided here
func (*Builder) WithLabels ¶
WithLabels merges existing labels if any with the ones that are provided here
func (*Builder) WithNamespace ¶
WithNamespace sets the namespace of ZFSSnapshot
type Kubeclient ¶
type Kubeclient struct {
// contains filtered or unexported fields
}
Kubeclient enables kubernetes API operations on zfssnap volume instance
func NewKubeclient ¶
func NewKubeclient(opts ...KubeclientBuildOption) *Kubeclient
NewKubeclient returns a new instance of kubeclient meant for zfssnap volume operations
func (*Kubeclient) Create ¶
func (k *Kubeclient) Create(vol *apis.ZFSSnapshot) (*apis.ZFSSnapshot, error)
Create creates a zfssnap volume instance in kubernetes cluster
func (*Kubeclient) Delete ¶
func (k *Kubeclient) Delete(name string) error
Delete deletes the zfssnap volume from kubernetes
func (*Kubeclient) Get ¶
func (k *Kubeclient) Get( name string, opts metav1.GetOptions, ) (*apis.ZFSSnapshot, error)
Get returns zfssnap volume object for given name
func (*Kubeclient) GetRaw ¶
func (k *Kubeclient) GetRaw( name string, opts metav1.GetOptions, ) ([]byte, error)
GetRaw returns zfssnap volume instance in bytes
func (*Kubeclient) List ¶
func (k *Kubeclient) List(opts metav1.ListOptions) (*apis.ZFSSnapshotList, error)
List returns a list of zfssnap volume instances present in kubernetes cluster
func (*Kubeclient) Update ¶
func (k *Kubeclient) Update(vol *apis.ZFSSnapshot) (*apis.ZFSSnapshot, error)
Update updates this zfssnap 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 ZFSSnapshotList
func ListBuilderFrom ¶
func ListBuilderFrom(vols apis.ZFSSnapshotList) *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.ZFSSnapshotList
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(*ZFSSnapshot) 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 ZFSSnapshot instance
type ZFSSnapshot ¶
type ZFSSnapshot struct { // ZFSSnap object Object *apis.ZFSSnapshot }
ZFSSnapshot is a wrapper over ZFSSnapshot API instance
func From ¶
func From(snap *apis.ZFSSnapshot) *ZFSSnapshot
From returns a new instance of zfssnap volume
func (*ZFSSnapshot) GetAPIObject ¶
func (snap *ZFSSnapshot) GetAPIObject() *apis.ZFSSnapshot
GetAPIObject returns zfssnap volume's API instance
func (*ZFSSnapshot) HasLabel ¶
func (snap *ZFSSnapshot) HasLabel(key, value string) bool
HasLabel returns true if provided label is present in the provided ZFSSnapshot instance
func (*ZFSSnapshot) IsNil ¶
func (snap *ZFSSnapshot) IsNil() bool
IsNil returns true if the zfssnap volume instance is nil
type ZFSSnapshotList ¶
type ZFSSnapshotList struct { // List contains list of snapshots List apis.ZFSSnapshotList }
ZFSSnapshotList holds the list of zfs snapshot instances
func (*ZFSSnapshotList) Len ¶
func (snapList *ZFSSnapshotList) Len() int
Len returns the number of items present in the ZFSSnapshotList