Documentation ¶
Index ¶
- type Builder
- func (b *Builder) Build() (*apis.ZFSRestore, 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) WithRemote(server string) *Builder
- func (b *Builder) WithStatus(status apis.ZFSRestoreStatus) *Builder
- func (b *Builder) WithVolume(name string) *Builder
- type Kubeclient
- func (k *Kubeclient) Create(rstr *apis.ZFSRestore) (*apis.ZFSRestore, error)
- func (k *Kubeclient) Delete(name string) error
- func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*apis.ZFSRestore, error)
- func (k *Kubeclient) GetRaw(name string, opts metav1.GetOptions) ([]byte, error)
- func (k *Kubeclient) List(opts metav1.ListOptions) (*apis.ZFSRestoreList, error)
- func (k *Kubeclient) Update(rstr *apis.ZFSRestore) (*apis.ZFSRestore, error)
- func (k *Kubeclient) WithNamespace(namespace string) *Kubeclient
- type KubeclientBuildOption
- type ListBuilder
- type Predicate
- type ZFSRestore
- type ZFSRestoreList
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 ZFSRestore
func BuildFrom ¶
func BuildFrom(rstr *apis.ZFSRestore) *Builder
BuildFrom returns new instance of Builder from the provided api instance
func (*Builder) Build ¶
func (b *Builder) Build() (*apis.ZFSRestore, error)
Build returns ZFSRestore 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 ZFSRestore
func (*Builder) WithRemote ¶
WithRemote sets the node id for ZFSRestore
func (*Builder) WithStatus ¶
func (b *Builder) WithStatus(status apis.ZFSRestoreStatus) *Builder
WithStatus sets the status for ZFSRestore
func (*Builder) WithVolume ¶
WithVolume sets the name of ZFSRestore
type Kubeclient ¶
type Kubeclient struct {
// contains filtered or unexported fields
}
Kubeclient enables kubernetes API operations on zfsrstr rstrume instance
func NewKubeclient ¶
func NewKubeclient(opts ...KubeclientBuildOption) *Kubeclient
NewKubeclient returns a new instance of kubeclient meant for zfsrstr rstrume operations
func (*Kubeclient) Create ¶
func (k *Kubeclient) Create(rstr *apis.ZFSRestore) (*apis.ZFSRestore, error)
Create creates a zfsrstr rstrume instance in kubernetes cluster
func (*Kubeclient) Delete ¶
func (k *Kubeclient) Delete(name string) error
Delete deletes the zfsrstr rstrume from kubernetes
func (*Kubeclient) Get ¶
func (k *Kubeclient) Get( name string, opts metav1.GetOptions, ) (*apis.ZFSRestore, error)
Get returns zfsrstr rstrume object for given name
func (*Kubeclient) GetRaw ¶
func (k *Kubeclient) GetRaw( name string, opts metav1.GetOptions, ) ([]byte, error)
GetRaw returns zfsrstr rstrume instance in bytes
func (*Kubeclient) List ¶
func (k *Kubeclient) List(opts metav1.ListOptions) (*apis.ZFSRestoreList, error)
List returns a list of zfsrstr rstrume instances present in kubernetes cluster
func (*Kubeclient) Update ¶
func (k *Kubeclient) Update(rstr *apis.ZFSRestore) (*apis.ZFSRestore, error)
Update updates this zfsrstr rstrume 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 ZFSRestoreList
func ListBuilderFrom ¶
func ListBuilderFrom(bkps apis.ZFSRestoreList) *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.ZFSRestoreList
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(*ZFSRestore) 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 ZFSRestore instance
type ZFSRestore ¶
type ZFSRestore struct { // ZFSSnap object Object *apis.ZFSRestore }
ZFSRestore is a wrapper over ZFSRestore API instance
func From ¶
func From(rstr *apis.ZFSRestore) *ZFSRestore
From returns a new instance of zfsrstr rstrume
func (*ZFSRestore) GetAPIObject ¶
func (rstr *ZFSRestore) GetAPIObject() *apis.ZFSRestore
GetAPIObject returns zfsrstr rstrume's API instance
func (*ZFSRestore) HasLabel ¶
func (rstr *ZFSRestore) HasLabel(key, value string) bool
HasLabel returns true if provided label is present in the provided ZFSRestore instance
func (*ZFSRestore) IsNil ¶
func (rstr *ZFSRestore) IsNil() bool
IsNil returns true if the zfsrstr rstrume instance is nil
type ZFSRestoreList ¶
type ZFSRestoreList struct { // List contains list of restore List apis.ZFSRestoreList }
ZFSRestoreList holds the list of zfs restore instances
func (*ZFSRestoreList) Len ¶
func (rstrList *ZFSRestoreList) Len() int
Len returns the number of items present in the ZFSRestoreList