Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDiskFree ¶
func GetDiskFree() (free uint64)
GetDiskFree is used to retrieve the amount of available disk space we have from a logical perspective with the headroom taken out
func GetPathFree ¶
GetPathFree will use the path supplied by the caller as the device context for which free space information is returned, this is from a pysical free capacity perspective rather than what the application is allowed to allocated which has to adjust for minimum amount free.
func InitDiskResource ¶
Types ¶
type DiskAllocated ¶
type DiskAllocated struct { Size uint64 // contains filtered or unexported fields }
DiskAllocated hold information about disk resources consumed on a specific device
func AllocDisk ¶
func AllocDisk(maxSpace uint64, live bool) (alloc *DiskAllocated, err kv.Error)
AllocDisk will assigned a specified amount of space from a logical bucket for the default disk device. An error is returned if the available amount of disk is insufficient
func (*DiskAllocated) Release ¶
func (alloc *DiskAllocated) Release() (err kv.Error)
Release will return assigned disk space back to the free pool of disk space for a default disk device. If the allocation is not recognized then an error is returned