driver

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 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 Closer

type Closer interface {
	Close()
}

type DriverFactory

type DriverFactory interface {
	CreateFileStorageDriver(backend *backendpb.BackendDetail) (FileStorageDriver, error)
}

type FileStorageDriver

type FileStorageDriver interface {
	CreateFileShare(ctx context.Context, fs *pb.CreateFileShareRequest) (*pb.CreateFileShareResponse, error)
	GetFileShare(ctx context.Context, fs *pb.GetFileShareRequest) (*pb.GetFileShareResponse, error)
	ListFileShare(ctx context.Context, fs *pb.ListFileShareRequest) (*pb.ListFileShareResponse, error)
	UpdatefileShare(ctx context.Context, fs *pb.UpdateFileShareRequest) (*pb.UpdateFileShareResponse, error)
	DeleteFileShare(ctx context.Context, in *pb.DeleteFileShareRequest) (*pb.DeleteFileShareResponse, error)
	// Close: cleanup when driver needs to be stopped.
	Close() error
}

define the fileshare driver interface.

func CreateStorageDriver

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

Jump to

Keyboard shortcuts

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