Documentation ¶
Index ¶
- type Kubeclient
- func (k *Kubeclient) Delete(name string, opts *metav1.DeleteOptions) error
- func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*snapshotapi.VolumeSnapshotData, error)
- func (k *Kubeclient) GetRaw(name string, opts metav1.GetOptions) ([]byte, error)
- func (k *Kubeclient) List(opts metav1.ListOptions) (*snapshotapi.VolumeSnapshotDataList, error)
- func (k *Kubeclient) ListRaw(opts metav1.ListOptions) ([]byte, error)
- func (k *Kubeclient) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*snapshotapi.VolumeSnapshotData, error)
- type KubeclientBuildOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Kubeclient ¶
type Kubeclient struct {
// contains filtered or unexported fields
}
Kubeclient enables kubernetes API operations on volumesnapshotdata instance
func NewKubeClient ¶
func NewKubeClient(opts ...KubeclientBuildOption) *Kubeclient
NewKubeClient returns a new instance of kubeclient meant for snapshot data
func (*Kubeclient) Delete ¶
func (k *Kubeclient) Delete(name string, opts *metav1.DeleteOptions) error
Delete deletes the snapshotdata if present in kubernetes cluster
func (*Kubeclient) Get ¶
func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*snapshotapi.VolumeSnapshotData, error)
Get return a volumesnapshotdata instance present in kubernetes cluster
func (*Kubeclient) GetRaw ¶
func (k *Kubeclient) GetRaw(name string, opts metav1.GetOptions) ([]byte, error)
GetRaw gets volumesnapshotdata object for a given name present in kubernetes cluster and returns result in raw byte.
func (*Kubeclient) List ¶
func (k *Kubeclient) List(opts metav1.ListOptions) (*snapshotapi.VolumeSnapshotDataList, error)
List returns a list of volumesnapshotdata instances present in kubernetes cluster
func (*Kubeclient) ListRaw ¶
func (k *Kubeclient) ListRaw(opts metav1.ListOptions) ([]byte, error)
ListRaw returns volumesnapshotdata object for given name in byte format
func (*Kubeclient) Patch ¶
func (k *Kubeclient) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*snapshotapi.VolumeSnapshotData, error)
Patch patches the snapshotdata if present in kubernetes cluster
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 snapshot client against the kubeclient instance
func WithKubeConfigPath ¶
func WithKubeConfigPath(kubeConfigPath string) KubeclientBuildOption
WithKubeConfigPath sets the kubeConfig path against client instance