Documentation
¶
Index ¶
- Constants
- Variables
- func CheckProcessExist(pid int) bool
- func GetDeviceID(f os.FileInfo) (int, error)
- func GetFuncName(fn interface{}) string
- func GetJSONFromRequest(r *http.Request, v interface{}) error
- func GetJSONFromResponse(r *http.Response, v interface{}) error
- func GetLocalIP() (string, error)
- func InitDir(dir string)
- func IsLocalAddress(host string) (bool, error)
- func ParseHostAndBrickPath(brickPath string) (string, string, error)
- func ValidateBrickPathLength(brickPath string) error
- func ValidateBrickPathStats(brickPath string, host string, force bool) error
- func ValidateBrickSubDirLength(brickPath string) error
- func ValidateXattrSupport(brickPath string, host string, uuid uuid.UUID, force bool) error
Constants ¶
const PosixPathMax = C._POSIX_PATH_MAX
PosixPathMax represents C's POSIX_PATH_MAX
Variables ¶
var ( PathMax = unix.PathMax Removexattr = unix.Removexattr Setxattr = unix.Setxattr Getxattr = unix.Getxattr )
Functions ¶
func CheckProcessExist ¶
Function to check whether the process with given pid exist or not in the system
func GetDeviceID ¶
GetDeviceID fetches the device id of the device containing the file/directory
func GetFuncName ¶
func GetFuncName(fn interface{}) string
GetFuncName returns the name of the passed function pointer
func GetJSONFromRequest ¶
GetJSONFromRequest unmarshals JSON in `r` into `v`
func GetJSONFromResponse ¶
GetJSONFromResponse unmarshals JSON in `r` into `v`
func GetLocalIP ¶
GetLocalIP() function will give local IP address of this node
func InitDir ¶
func InitDir(dir string)
InitDir checks if the input directory is present, a direcotry and is accessible. @ If the directory is not present, it will create directory. @ If it is not a directory, initDir panics. @ If the directory is not accessible, initDir panics.
func IsLocalAddress ¶
IsLocalAddress checks whether a given host/IP is local
func ParseHostAndBrickPath ¶
ParseHostAndBrickPath parses the host & brick path out of req.Bricks list
func ValidateBrickPathLength ¶
ValidateBrickPathLength validates the length of the brick path
func ValidateBrickPathStats ¶
ValidateBrickPathStats checks whether the brick directory can be created with certain validations like directory checks, whether directory is part of mount point etc
func ValidateBrickSubDirLength ¶
ValidateBrickSubDirLength validates the length of each sub directories under the brick path
Types ¶
This section is empty.