Documentation
¶
Index ¶
- Constants
- func NewControllerServer(lvmctrld pb.LvmCtrldClient, volumeLock VolumeLocker, diskRpc diskrpc.DiskRpc, ...) (*controllerServer, error)
- func NewFileSystemRegistry() (*fileSystemRegistry, error)
- func NewIdentityServer(drvName, version string) (*identityServer, error)
- func NewNodeServer(lvmctrld pb.LvmCtrldClient, volumeLock VolumeLocker, ...) (*nodeServer, error)
- type DiskRpcService
- type FileSystem
- type FileSystemRegistry
- type Listener
- type LogVolType
- type LvmCtrldClientConnection
- type RpcRole
- type TagKey
- type VolumeAccessType
- type VolumeInfo
- type VolumeLocker
- type VolumeRef
Constants ¶
View Source
const (
DefaultCapacity = 1 << 20
)
Variables ¶
This section is empty.
Functions ¶
func NewControllerServer ¶
func NewControllerServer(lvmctrld pb.LvmCtrldClient, volumeLock VolumeLocker, diskRpc diskrpc.DiskRpc, defaultFs string) (*controllerServer, error)
func NewFileSystemRegistry ¶
func NewFileSystemRegistry() (*fileSystemRegistry, error)
func NewIdentityServer ¶
func NewNodeServer ¶
func NewNodeServer(lvmctrld pb.LvmCtrldClient, volumeLock VolumeLocker, fsRegistry FileSystemRegistry) (*nodeServer, error)
Types ¶
type DiskRpcService ¶
DiskRpcService adapts DiskRpc to use volume locking.
func NewDiskRpcService ¶
func NewDiskRpcService(lvmctrld pb.LvmCtrldClient, locker VolumeLocker) (*DiskRpcService, error)
func (*DiskRpcService) Start ¶
func (s *DiskRpcService) Start() error
type FileSystem ¶
type FileSystem interface { Accepts(accessType VolumeAccessType) bool Make(device string) error Grow(device string) error Mount(source, mountPoint string, flags []string) error Umount(mountPoint string) error }
func NewFileSystem ¶
func NewFileSystem(fs string) (FileSystem, error)
type FileSystemRegistry ¶
type FileSystemRegistry interface {
GetFileSystem(filesystem string) (FileSystem, error)
}
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
func NewListener ¶
type LogVolType ¶
type LogVolType string
const ( VolumeVolType LogVolType = "volume" SnapshotVolType LogVolType = "snapshot" TemporaryVolType LogVolType = "temp" )
type LvmCtrldClientConnection ¶
type LvmCtrldClientConnection struct { pb.LvmCtrldClient // contains filtered or unexported fields }
func NewLvmCtrldClient ¶
func NewLvmCtrldClient(address string) (*LvmCtrldClientConnection, error)
func (*LvmCtrldClientConnection) Close ¶
func (c *LvmCtrldClientConnection) Close() error
func (*LvmCtrldClientConnection) Wait ¶
func (c *LvmCtrldClientConnection) Wait() error
type VolumeAccessType ¶
type VolumeAccessType int
const ( MountAccessType VolumeAccessType = iota BlockAccessType BlockAccessFsName = "$raw" // the $ prefix is to avoid colliding with a real filesystem name. )
type VolumeInfo ¶
type VolumeInfo struct { VolumeRef *pb.LogicalVolume }
A type that holds details of a volume by wrapping a LogicalVolume.
func NewVolumeInfoFromLv ¶
func NewVolumeInfoFromLv(lv *pb.LogicalVolume) *VolumeInfo
func (*VolumeInfo) OriginRef ¶
func (v *VolumeInfo) OriginRef() *VolumeRef
func (*VolumeInfo) String ¶
func (v *VolumeInfo) String() string
type VolumeLocker ¶
type VolumeLocker interface { // Lock the given volume for the given operation. // // Volume locks are reentrant per volume (but not per <volume, op> pairs), // that is one can lock the same volume with multiple ops. LockVolume(ctx context.Context, vol VolumeRef, op string) error // Unlock a volume for a given <vol, op> pair. UnlockVolume(ctx context.Context, vol VolumeRef, op string) error // Retrieve the owner mailbox and name for a volume, if any. GetOwner(ctx context.Context, ref VolumeRef) (diskrpc.MailBoxID, string, error) }
func NewVolumeLocker ¶
func NewVolumeLocker(lvmctrld pb.LvmCtrldClient, nodeName string) (VolumeLocker, error)
type VolumeRef ¶
A type that holds a volume reference. Only the VgName and LvName fields are expected to be set.
func NewVolumeRefFromID ¶
func NewVolumeRefFromLv ¶
func NewVolumeRefFromLv(lv *pb.LogicalVolume) *VolumeRef
func NewVolumeRefFromVgTypeName ¶
func NewVolumeRefFromVgTypeName(vg string, t LogVolType, name string) *VolumeRef
Click to show internal directories.
Click to hide internal directories.