Documentation ¶
Index ¶
- type Builder
- func (b *Builder) Build() (*apis.ZFSBackup, error)
- func (b *Builder) WithFinalizer(finalizer []string) *Builder
- func (b *Builder) WithLabels(labels map[string]string) *Builder
- func (b *Builder) WithName(name string) *Builder
- func (b *Builder) WithNamespace(namespace string) *Builder
- func (b *Builder) WithNode(node string) *Builder
- func (b *Builder) WithPrevSnap(snap string) *Builder
- func (b *Builder) WithRemote(server string) *Builder
- func (b *Builder) WithSnap(snap string) *Builder
- func (b *Builder) WithStatus(status apis.ZFSBackupStatus) *Builder
- func (b *Builder) WithVolume(volume string) *Builder
- type Kubeclient
- func (k *Kubeclient) Create(bkp *apis.ZFSBackup) (*apis.ZFSBackup, error)
- func (k *Kubeclient) Delete(name string) error
- func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*apis.ZFSBackup, error)
- func (k *Kubeclient) GetRaw(name string, opts metav1.GetOptions) ([]byte, error)
- func (k *Kubeclient) List(opts metav1.ListOptions) (*apis.ZFSBackupList, error)
- func (k *Kubeclient) Update(bkp *apis.ZFSBackup) (*apis.ZFSBackup, error)
- func (k *Kubeclient) WithNamespace(namespace string) *Kubeclient
- type KubeclientBuildOption
- type ListBuilder
- type Predicate
- type ZFSBackup
- type ZFSBackupList
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 ZFSBackup
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 ZFSBackup
func (*Builder) WithPrevSnap ¶
WithPrevSnap sets the previous snapshot for ZFSBackup
func (*Builder) WithRemote ¶
WithRemote sets the remote address for the ZFSBackup
func (*Builder) WithStatus ¶
func (b *Builder) WithStatus(status apis.ZFSBackupStatus) *Builder
WithStatus sets the status of the Backup progress
func (*Builder) WithVolume ¶
WithVolume sets the volume name of ZFSBackup
type Kubeclient ¶
type Kubeclient struct {
// contains filtered or unexported fields
}
Kubeclient enables kubernetes API operations on zfsbkp bkpume instance
func NewKubeclient ¶
func NewKubeclient(opts ...KubeclientBuildOption) *Kubeclient
NewKubeclient returns a new instance of kubeclient meant for zfsbkp bkpume operations
func (*Kubeclient) Delete ¶
func (k *Kubeclient) Delete(name string) error
Delete deletes the zfsbkp bkpume from kubernetes
func (*Kubeclient) Get ¶
func (k *Kubeclient) Get( name string, opts metav1.GetOptions, ) (*apis.ZFSBackup, error)
Get returns zfsbkp bkpume object for given name
func (*Kubeclient) GetRaw ¶
func (k *Kubeclient) GetRaw( name string, opts metav1.GetOptions, ) ([]byte, error)
GetRaw returns zfsbkp bkpume instance in bytes
func (*Kubeclient) List ¶
func (k *Kubeclient) List(opts metav1.ListOptions) (*apis.ZFSBackupList, error)
List returns a list of zfsbkp bkpume 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 ZFSBackupList
func ListBuilderFrom ¶
func ListBuilderFrom(bkps apis.ZFSBackupList) *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.ZFSBackupList
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 ¶
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 ZFSBackup instance
type ZFSBackup ¶
ZFSBackup is a wrapper over ZFSBackup API instance
func (*ZFSBackup) GetAPIObject ¶
GetAPIObject returns zfsbkp bkpume's API instance
type ZFSBackupList ¶
type ZFSBackupList struct { // List contains list of backups List apis.ZFSBackupList }
ZFSBackupList holds the list of zfs backup instances
func (*ZFSBackupList) Len ¶
func (bkpList *ZFSBackupList) Len() int
Len returns the number of items present in the ZFSBackupList