connection

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2018 License: Apache-2.0 Imports: 13 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, readyToUse bool, err error)

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

	// GetSnapshotStatus returns if a snapshot is ready to use, creation time, and restore size.
	GetSnapshotStatus(ctx context.Context, snapshotID string) (bool, 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