Documentation ¶
Index ¶
- Constants
- Variables
- func EnableProfiling()
- func ExecCommand(command string, args []string) ([]byte, error)
- func ExecCommandHost(command string, args []string) ([]byte, error)
- func GetVersion() string
- func HttpGet(reqURL string, queryMap map[string]string) (int, []byte, error)
- func IsNotFoundErr(err error, id ...string) bool
- func StringFlagPutHandler(setter StringFlagSetterFunc) http.HandlerFunc
- func SystemMapOnHost(ctx context.Context, serviceName string, mapCommands []string) (err error)
- func ValidateDriverName(driverName string) error
- type DeviceStats
- type NotFoundErr
- type ResizeFs
- type StringFlagSetterFunc
- type VolumeLocks
Constants ¶
View Source
const ( // VolumeOperationAlreadyExistsFmt string format to return for concerrent operation VolumeOperationAlreadyExistsFmt = "an operation with the given Volume ID %s already exists" // VolumeOperationAlreadyExistsFmt string format to return for concerrent operation SnapshotOperationAlreadyExistsFmt = "an operation with the given Snapshot ID %s already exists" )
Variables ¶
View Source
var ( BuildTime string GitCommit string Version string )
Functions ¶
func GetVersion ¶
func GetVersion() string
func IsNotFoundErr ¶
func StringFlagPutHandler ¶
func StringFlagPutHandler(setter StringFlagSetterFunc) http.HandlerFunc
StringFlagPutHandler wraps an http Handler to set string type flag.
func SystemMapOnHost ¶
func ValidateDriverName ¶
ValidateDriverName validates the driver name
Types ¶
type DeviceStats ¶
type DeviceStats struct { Block bool AvailableBytes int64 TotalBytes int64 UsedBytes int64 AvailableInodes int64 TotalInodes int64 UsedInodes int64 }
func GetDeviceStats ¶
func GetDeviceStats(path string) (*DeviceStats, error)
type NotFoundErr ¶
type NotFoundErr struct {
Id string
}
func NewNotFoundErr ¶
func NewNotFoundErr(id ...string) *NotFoundErr
func (*NotFoundErr) Error ¶
func (e *NotFoundErr) Error() string
type ResizeFs ¶
type ResizeFs struct {
// contains filtered or unexported fields
}
func NewResizeFs ¶
func NewResizeFs(mounter *mount.SafeFormatAndMount) *ResizeFs
type StringFlagSetterFunc ¶
type VolumeLocks ¶
type VolumeLocks struct {
// contains filtered or unexported fields
}
VolumeLocks implements a map with atomic operations. It stores a set of all volume IDs with an ongoing operation.
func (*VolumeLocks) Release ¶
func (vl *VolumeLocks) Release(volumeID string)
func (*VolumeLocks) TryAcquire ¶
func (vl *VolumeLocks) TryAcquire(volumeID string) bool
TryAcquire tries to acquire the lock for operating on volumeID and returns true if successful. If another operation is already using volumeID, returns false.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.