Documentation
¶
Index ¶
- Variables
- func CheckDiskIsFast() (speedMB float64, isFast bool, err error)
- func CheckDiskWritingSpeed() (speedMB float64, err error)
- func DiskIsExtremelyFast() bool
- func DiskIsFast() bool
- func ReadFile(filename string) (data []byte, err error)
- func Remove(filename string) (err error)
- func Rename(oldPath string, newPath string) (err error)
- func WaitLoad(maxLoad float64, maxLoops int, delay time.Duration)
- func WriteFile(filename string, data []byte, perm os.FileMode) (err error)
- type DiskSpeedCache
- type Limiter
- type Locker
- type Speed
- type StatResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DiskSpeed = SpeedLow DiskSpeedMB float64 )
View Source
var IsInExtremelyHighLoad = false
View Source
var IsInHighLoad = false
View Source
var ReaderLimiter = NewLimiter(maxThreads)
View Source
var WriterLimiter = NewLimiter(maxThreads)
Functions ¶
func CheckDiskIsFast ¶ added in v1.2.5
CheckDiskIsFast check disk is 'fast' disk to write
func CheckDiskWritingSpeed ¶ added in v1.2.5
CheckDiskWritingSpeed test disk writing speed
func DiskIsExtremelyFast ¶ added in v1.2.7
func DiskIsExtremelyFast() bool
func DiskIsFast ¶ added in v1.2.7
func DiskIsFast() bool
Types ¶
type DiskSpeedCache ¶ added in v1.2.10
type Limiter ¶ added in v1.3.7
type Limiter struct {
// contains filtered or unexported fields
}
func NewLimiter ¶ added in v1.3.7
func (*Limiter) FreeThreads ¶ added in v1.3.7
type StatResult ¶
type StatResult struct {
// contains filtered or unexported fields
}
func NewStatResult ¶
func NewStatResult(rawStat *unix.Statfs_t) *StatResult
func StatDevice ¶ added in v1.2.9
func StatDevice(path string) (*StatResult, error)
StatDevice device contains the path
func StatDeviceCache ¶ added in v1.2.9
func StatDeviceCache(path string) (*StatResult, error)
StatDeviceCache stat device with cache
func (*StatResult) FreeSize ¶
func (this *StatResult) FreeSize() uint64
func (*StatResult) TotalSize ¶
func (this *StatResult) TotalSize() uint64
func (*StatResult) UsedSize ¶
func (this *StatResult) UsedSize() uint64
Click to show internal directories.
Click to hide internal directories.