driver

package
v0.0.0-...-5f64e5d Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDriverName = "duni.csi.zfs.com"
	Version           = "0.0.1"
)

Variables

View Source
var (
	NoSuchPoolErr = errors.New("no such pool")
)

Functions

This section is empty.

Types

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

func NewDriver

func NewDriver(endpoint string, driverName string, hostname string, maxVolumesPerNode int64,
	p provider.VolumeProvider, zfsUtil ZFSInterface) (*Driver, error)

func (*Driver) CreateSnapshot

func (*Driver) CreateVolume

func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)

func (*Driver) DeleteSnapshot

func (*Driver) DeleteVolume

func (d *Driver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)

func (*Driver) GetCapacity

func (d *Driver) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)

func (*Driver) ListSnapshots

func (d *Driver) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)

func (*Driver) ListVolumes

func (d *Driver) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)

func (*Driver) NodeExpandVolume

func (*Driver) NodeGetInfo

func (*Driver) NodeGetVolumeStats

func (*Driver) NodePublishVolume

func (*Driver) NodeStageVolume

func (*Driver) NodeUnpublishVolume

func (*Driver) NodeUnstageVolume

func (*Driver) Probe

func (*Driver) Run

func (d *Driver) Run(ctx context.Context) error

type VolumeStatistics

type VolumeStatistics struct {
	// contains filtered or unexported fields
}

type ZFSInterface

type ZFSInterface interface {
	ImportZPool(poolName string) error
	CreateZPool(poolName string, devices []string) error
	CreateZFS(pathName string) error
	ExportZPool(poolName string) error
	Mount(source string, target string, opts ...string) error
	Unmount(target string) error
	GetStatistics(volumePath string) (VolumeStatistics, error)
	Resize(poolName string, deviceName string) error
}

func NewZFSUtil

func NewZFSUtil() ZFSInterface

type ZFSUtil

type ZFSUtil struct {
}

func (*ZFSUtil) CreateZFS

func (z *ZFSUtil) CreateZFS(pathName string) error

func (*ZFSUtil) CreateZPool

func (z *ZFSUtil) CreateZPool(poolName string, devices []string) error

func (*ZFSUtil) ExportZPool

func (z *ZFSUtil) ExportZPool(poolName string) error

func (*ZFSUtil) GetStatistics

func (z *ZFSUtil) GetStatistics(volumePath string) (VolumeStatistics, error)

func (*ZFSUtil) ImportZPool

func (z *ZFSUtil) ImportZPool(poolName string) error

func (*ZFSUtil) Mount

func (z *ZFSUtil) Mount(source string, target string, opts ...string) error

func (*ZFSUtil) Resize

func (z *ZFSUtil) Resize(poolName string, deviceName string) error

func (*ZFSUtil) Unmount

func (z *ZFSUtil) Unmount(target string) error

Jump to

Keyboard shortcuts

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