Documentation ¶
Index ¶
- func SetInstance(i Ops)
- type Client
- func (c *Client) CreateSnapshot(snap *snapv1.VolumeSnapshot) (*snapv1.VolumeSnapshot, error)
- func (c *Client) CreateSnapshotData(snapData *snapv1.VolumeSnapshotData) (*snapv1.VolumeSnapshotData, error)
- func (c *Client) DeleteSnapshot(name string, namespace string) error
- func (c *Client) DeleteSnapshotData(name string) error
- func (c *Client) GetSnapshot(name string, namespace string) (*snapv1.VolumeSnapshot, error)
- func (c *Client) GetSnapshotData(name string) (*snapv1.VolumeSnapshotData, error)
- func (c *Client) GetSnapshotStatus(name string, namespace string) (*snapv1.VolumeSnapshotStatus, error)
- func (c *Client) GetVolumeForSnapshot(name string, namespace string) (string, error)
- func (c *Client) ListSnapshots(namespace string) (*snapv1.VolumeSnapshotList, error)
- func (c *Client) SetConfig(cfg *rest.Config)
- func (c *Client) UpdateSnapshot(snap *snapv1.VolumeSnapshot) (*snapv1.VolumeSnapshot, error)
- func (c *Client) ValidateSnapshot(name string, namespace string, retry bool, ...) error
- func (c *Client) ValidateSnapshotData(name string, retry bool, timeout, retryInterval time.Duration) error
- type Ops
- type SnapshotOps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetInstance ¶
func SetInstance(i Ops)
SetInstance replaces the instance with the provided one. Should be used only for testing purposes.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a wrapper for the external-storage client.
func NewForConfig ¶
NewForConfig builds a new client for the given config.
func (*Client) CreateSnapshot ¶
func (c *Client) CreateSnapshot(snap *snapv1.VolumeSnapshot) (*snapv1.VolumeSnapshot, error)
CreateSnapshot creates the given snapshot
func (*Client) CreateSnapshotData ¶
func (c *Client) CreateSnapshotData(snapData *snapv1.VolumeSnapshotData) (*snapv1.VolumeSnapshotData, error)
CreateSnapshotData creates the given volume snapshot data object
func (*Client) DeleteSnapshot ¶
DeleteSnapshot deletes the given snapshot
func (*Client) DeleteSnapshotData ¶
DeleteSnapshotData deletes the given snapshot
func (*Client) GetSnapshot ¶
GetSnapshot returns the snapshot for given name and namespace
func (*Client) GetSnapshotData ¶
func (c *Client) GetSnapshotData(name string) (*snapv1.VolumeSnapshotData, error)
GetSnapshotData returns the snapshot for given name
func (*Client) GetSnapshotStatus ¶
func (c *Client) GetSnapshotStatus(name string, namespace string) (*snapv1.VolumeSnapshotStatus, error)
GetSnapshotStatus returns the status of the given snapshot
func (*Client) GetVolumeForSnapshot ¶
GetVolumeForSnapshot returns the volumeID for the given snapshot
func (*Client) ListSnapshots ¶
func (c *Client) ListSnapshots(namespace string) (*snapv1.VolumeSnapshotList, error)
ListSnapshots lists all snapshots in the given namespace
func (*Client) UpdateSnapshot ¶
func (c *Client) UpdateSnapshot(snap *snapv1.VolumeSnapshot) (*snapv1.VolumeSnapshot, error)
UpdateSnapshot updates the given snapshot
type Ops ¶
type Ops interface { SnapshotOps // SetConfig sets the config and resets the client SetConfig(config *rest.Config) }
Ops is an interface to perform operations on external storage resources.
func NewInstanceFromConfigFile ¶
NewInstanceFromConfigFile returns new instance of client by using given config file
type SnapshotOps ¶
type SnapshotOps interface { // GetSnapshot returns the snapshot for given name and namespace GetSnapshot(name string, namespace string) (*snapv1.VolumeSnapshot, error) // ListSnapshots lists all snapshots in the given namespace ListSnapshots(namespace string) (*snapv1.VolumeSnapshotList, error) // CreateSnapshot creates the given snapshot CreateSnapshot(*snapv1.VolumeSnapshot) (*snapv1.VolumeSnapshot, error) // UpdateSnapshot updates the given snapshot UpdateSnapshot(*snapv1.VolumeSnapshot) (*snapv1.VolumeSnapshot, error) // DeleteSnapshot deletes the given snapshot DeleteSnapshot(name string, namespace string) error // ValidateSnapshot validates the given snapshot. ValidateSnapshot(name string, namespace string, retry bool, timeout, retryInterval time.Duration) error // GetVolumeForSnapshot returns the volumeID for the given snapshot GetVolumeForSnapshot(name string, namespace string) (string, error) // GetSnapshotStatus returns the status of the given snapshot GetSnapshotStatus(name string, namespace string) (*snapv1.VolumeSnapshotStatus, error) // GetSnapshotData returns the snapshot for given name GetSnapshotData(name string) (*snapv1.VolumeSnapshotData, error) // CreateSnapshotData creates the given volume snapshot data object CreateSnapshotData(*snapv1.VolumeSnapshotData) (*snapv1.VolumeSnapshotData, error) // DeleteSnapshotData deletes the given snapshot DeleteSnapshotData(name string) error // ValidateSnapshotData validates the given snapshot data object ValidateSnapshotData(name string, retry bool, timeout, retryInterval time.Duration) error }
SnapshotOps is an interface to perform k8s VolumeSnapshot operations