topolvm: github.com/cybozu-go/topolvm/driver Index | Files | Directories

package driver

import "github.com/cybozu-go/topolvm/driver"

Index

Package Files

controller.go identity.go logical_volume.go node.go

Constants

const (
    // DeviceDirectory is a directory where TopoLVM Node service creates device files.
    DeviceDirectory = "/dev/topolvm"
)

Variables

var ErrVolumeNotFound = errors.New("VolumeID is not found")

ErrVolumeNotFound is error message when VolumeID is not found

func NewControllerService Uses

func NewControllerService(service LogicalVolumeService) csi.ControllerServer

NewControllerService returns a new ControllerServer.

func NewIdentityService Uses

func NewIdentityService(ready func() (bool, error)) csi.IdentityServer

NewIdentityService returns a new IdentityServer.

ready is a function to check the plugin status. It should return non-nil error if the plugin is not healthy. If the plugin is not yet ready, it should return (false, nil). Otherwise, return (true, nil).

func NewNodeService Uses

func NewNodeService(nodeName string, conn *grpc.ClientConn) csi.NodeServer

NewNodeService returns a new NodeServer.

type LogicalVolumeService Uses

type LogicalVolumeService interface {
    CreateVolume(ctx context.Context, node string, name string, sizeGb int64, capabilities []*csi.VolumeCapability) (string, error)
    DeleteVolume(ctx context.Context, volumeID string) error
    ExpandVolume(ctx context.Context, volumeID string, sizeGb int64) error
    VolumeExists(ctx context.Context, volumeID string) error
    GetCapacity(ctx context.Context, requestNodeNumber string) (int64, error)
    GetMaxCapacity(ctx context.Context) (string, int64, error)
}

LogicalVolumeService abstract the operations of logical volumes

Directories

PathSynopsis
k8s
mock

Package driver imports 18 packages (graph) and is imported by 2 packages. Updated 2019-10-12. Refresh now. Tools for package owners.