Documentation ¶
Index ¶
- Constants
- func NewControllerServer(nodeID string, vh *VolumeHelper) *controllerServer
- func NewIdentityServer(name string, isController bool, version string) *identityServer
- func NewNodeServer(nodeId string, maxVolumesPerNode int64, vh *VolumeHelper) *nodeServer
- func NewNonBlockingGRPCServer() *nonBlockingGRPCServer
- func NewSharedHostPathDriver(driverName, nodeID, endpoint, dataRoot, dsn string, maxVolumesPerNode int64, ...) (*sharedHostPath, error)
- type ControllerPublishVolumeInfo
- type NodeInfo
- type NodePublishVolumeInfo
- type Volume
- type VolumeHelper
- func (vh *VolumeHelper) CleanUpDanglingVolumes() error
- func (vh *VolumeHelper) Close() error
- func (vh *VolumeHelper) CreateControllerPublishVolumeInfo(volId, nodeId string, readonly bool) error
- func (vh *VolumeHelper) CreateNodePublishVolumeInfo(volId, nodeId, mountPath string, rawMount, readonly bool) error
- func (vh *VolumeHelper) CreateVolume(volid, volname, pvname, pvcname, nsname string, capacity int64, isblock bool) (*Volume, error)
- func (vh *VolumeHelper) DeleteControllerPublishVolumeInfo(volId, nodeId string) error
- func (vh *VolumeHelper) DeleteNodePublishVolumeInfo(volId, nodeId, mountPath string) error
- func (vh *VolumeHelper) DeleteVolume(volid string) error
- func (vh *VolumeHelper) GetControllerPublishVolumeInfo(volId, nodeId string) (*ControllerPublishVolumeInfo, error)
- func (vh *VolumeHelper) GetNodeInfo(nodeId string, age int64) (*NodeInfo, error)
- func (vh *VolumeHelper) GetNodePublishVolumeInfo(volId, nodeId, mountPath string) (*NodePublishVolumeInfo, error)
- func (vh *VolumeHelper) GetVolume(volid string) (*Volume, error)
- func (vh *VolumeHelper) GetVolumeCount() (int, error)
- func (vh *VolumeHelper) GetVolumeIdByName(volname string) (string, error)
- func (vh *VolumeHelper) GetVolumeWithDetail(volid string) (map[string]interface{}, error)
- func (vh *VolumeHelper) GetVolumesWithDetail(offset, limit int) ([]map[string]interface{}, error)
- func (vh *VolumeHelper) ReBuildSymLinks() error
- func (vh *VolumeHelper) UpdateNodeInfoLastSeen(nodeId string, lastSeen time.Time) error
- func (vh *VolumeHelper) UpdateVolumeCapacity(vol *Volume, capacity int64) error
Constants ¶
View Source
const ( MiB = 1 << 20 GiB = 1 << 30 )
Variables ¶
This section is empty.
Functions ¶
func NewControllerServer ¶
func NewControllerServer(nodeID string, vh *VolumeHelper) *controllerServer
func NewIdentityServer ¶
func NewNodeServer ¶
func NewNodeServer(nodeId string, maxVolumesPerNode int64, vh *VolumeHelper) *nodeServer
func NewNonBlockingGRPCServer ¶
func NewNonBlockingGRPCServer() *nonBlockingGRPCServer
Types ¶
type NodePublishVolumeInfo ¶
type Volume ¶
type Volume struct { StorageID int64 `gorm:"autoIncrement"` CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt `gorm:"index"` VolID string `gorm:"uniqueIndex; not null"` VolName string `gorm:"index; not null"` PVName string `gorm:"not null"` PVCName string `gorm:"not null"` NSName string `gorm:"index; not null"` Capacity int64 IsBlock bool VolPath string `gorm:"uniqueIndex; not null"` }
func (*Volume) PopulateVolumeIfRequired ¶
type VolumeHelper ¶
type VolumeHelper struct {
// contains filtered or unexported fields
}
func NewVolumeHelper ¶
func NewVolumeHelper(dataRoot, dsn string) (*VolumeHelper, error)
func (*VolumeHelper) CleanUpDanglingVolumes ¶
func (vh *VolumeHelper) CleanUpDanglingVolumes() error
func (*VolumeHelper) Close ¶
func (vh *VolumeHelper) Close() error
func (*VolumeHelper) CreateControllerPublishVolumeInfo ¶
func (vh *VolumeHelper) CreateControllerPublishVolumeInfo(volId, nodeId string, readonly bool) error
func (*VolumeHelper) CreateNodePublishVolumeInfo ¶
func (vh *VolumeHelper) CreateNodePublishVolumeInfo(volId, nodeId, mountPath string, rawMount, readonly bool) error
func (*VolumeHelper) CreateVolume ¶
func (*VolumeHelper) DeleteControllerPublishVolumeInfo ¶
func (vh *VolumeHelper) DeleteControllerPublishVolumeInfo(volId, nodeId string) error
func (*VolumeHelper) DeleteNodePublishVolumeInfo ¶
func (vh *VolumeHelper) DeleteNodePublishVolumeInfo(volId, nodeId, mountPath string) error
func (*VolumeHelper) DeleteVolume ¶
func (vh *VolumeHelper) DeleteVolume(volid string) error
func (*VolumeHelper) GetControllerPublishVolumeInfo ¶
func (vh *VolumeHelper) GetControllerPublishVolumeInfo(volId, nodeId string) (*ControllerPublishVolumeInfo, error)
func (*VolumeHelper) GetNodeInfo ¶
func (vh *VolumeHelper) GetNodeInfo(nodeId string, age int64) (*NodeInfo, error)
func (*VolumeHelper) GetNodePublishVolumeInfo ¶
func (vh *VolumeHelper) GetNodePublishVolumeInfo(volId, nodeId, mountPath string) (*NodePublishVolumeInfo, error)
func (*VolumeHelper) GetVolumeCount ¶ added in v1.0.2
func (vh *VolumeHelper) GetVolumeCount() (int, error)
func (*VolumeHelper) GetVolumeIdByName ¶
func (vh *VolumeHelper) GetVolumeIdByName(volname string) (string, error)
func (*VolumeHelper) GetVolumeWithDetail ¶
func (vh *VolumeHelper) GetVolumeWithDetail(volid string) (map[string]interface{}, error)
func (*VolumeHelper) GetVolumesWithDetail ¶
func (vh *VolumeHelper) GetVolumesWithDetail(offset, limit int) ([]map[string]interface{}, error)
func (*VolumeHelper) ReBuildSymLinks ¶
func (vh *VolumeHelper) ReBuildSymLinks() error
func (*VolumeHelper) UpdateNodeInfoLastSeen ¶
func (vh *VolumeHelper) UpdateNodeInfoLastSeen(nodeId string, lastSeen time.Time) error
func (*VolumeHelper) UpdateVolumeCapacity ¶
func (vh *VolumeHelper) UpdateVolumeCapacity(vol *Volume, capacity int64) error
Click to show internal directories.
Click to hide internal directories.