driver

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCloser

func AddCloser(closer Closer)

func FreeCloser

func FreeCloser()

func RegisterDriverFactory

func RegisterDriverFactory(driverType string, factory DriverFactory)

Types

type BlockDriver

type BlockDriver interface {
	CreateVolume(ctx context.Context, volume *block.CreateVolumeRequest) (*block.CreateVolumeResponse, error)
	GetVolume(ctx context.Context, volume *block.GetVolumeRequest) (*block.GetVolumeResponse, error)
	ListVolume(ctx context.Context, volume *block.ListVolumeRequest) (*block.ListVolumeResponse, error)
	UpdateVolume(ctx context.Context, volume *block.UpdateVolumeRequest) (*block.UpdateVolumeResponse, error)
	DeleteVolume(ctx context.Context, volume *block.DeleteVolumeRequest) (*block.DeleteVolumeResponse, error)
	// Close: cleanup when driver needs to be stopped.
	Close() error
}

define the block driver interface.

func CreateStorageDriver

func CreateStorageDriver(backend *backendpb.BackendDetail) (BlockDriver, error)

type Closer

type Closer interface {
	Close()
}

type DriverFactory

type DriverFactory interface {
	CreateBlockStorageDriver(backend *backendpb.BackendDetail) (BlockDriver, error)
}

Jump to

Keyboard shortcuts

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