connection

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSIConnection

type CSIConnection interface {
	// GetDriverName returns driver name as discovered by GetPluginInfo()
	// gRPC call.
	GetDriverName(ctx context.Context) (string, error)

	// SupportsControllerCreateSnapshot returns true if the CSI driver reports
	// CREATE_DELETE_SNAPSHOT in ControllerGetCapabilities() gRPC call.
	SupportsControllerCreateSnapshot(ctx context.Context) (bool, error)

	// SupportsControllerListSnapshots returns true if the CSI driver reports
	// LIST_SNAPSHOTS in ControllerGetCapabilities() gRPC call.
	SupportsControllerListSnapshots(ctx context.Context) (bool, error)

	// CreateSnapshot creates a snapshot for a volume
	CreateSnapshot(ctx context.Context, snapshotName string, volume *v1.PersistentVolume, parameters map[string]string, snapshotterCredentials map[string]string) (driverName string, snapshotId string, timestamp int64, size int64, status *csi.SnapshotStatus, err error)

	// DeleteSnapshot deletes a snapshot from a volume
	DeleteSnapshot(ctx context.Context, snapshotID string, snapshotterCredentials map[string]string) (err error)

	// GetSnapshotStatus returns a snapshot's status, creation time, and restore size.
	GetSnapshotStatus(ctx context.Context, snapshotID string) (*csi.SnapshotStatus, int64, int64, error)

	// Probe checks that the CSI driver is ready to process requests
	Probe(ctx context.Context) error

	// Close the connection
	Close() error
}

CSIConnection is gRPC connection to a remote CSI driver and abstracts all CSI calls.

func New

func New(address string, timeout time.Duration) (CSIConnection, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL