Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDirAndWritable ¶
IsDirAndWritable checks a given path is directory and writable
func IsDirReadWritable ¶
IsDirReadWritable check if the dir is writable and readable by cdc server
func IsDirWritable ¶
IsDirWritable checks if a dir is writable, return error nil means it is writable
Types ¶
type DiskInfo ¶
DiskInfo present the disk amount information, in gb
func GetDiskInfo ¶
GetDiskInfo return the disk space information of the given directory the caller should guarantee that dir exist
type FileLock ¶
type FileLock struct {
// contains filtered or unexported fields
}
FileLock represents a file lock created by `flock`. For more on the system call `flock`, read: https://linux.die.net/man/2/flock
func NewFileLock ¶
NewFileLock creates a new file lock on the file described in filePath.
func (*FileLock) Close ¶
Close closes the underlying file. NOTE: this function will unlock the lock as well.