Documentation ¶
Index ¶
- Constants
- Variables
- func GetDeviceID(f os.FileInfo) (int, error)
- func GetJSONFromRequest(r *http.Request, v interface{}) error
- func GetJSONFromResponse(r *http.Response, v interface{}) error
- 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 GetDeviceID ¶
GetDeviceID fetches the device id of the device containing the file/directory
func GetJSONFromRequest ¶
GetJSONFromRequest unmarshals JSON in `r` into `v`
func GetJSONFromResponse ¶
GetJSONFromResponse unmarshals JSON in `r` into `v`
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.