Documentation ¶
Index ¶
- Constants
- func BinDirPath() string
- func BinFilePath() string
- func EtcDirPath() string
- func EtcFilePath(fileName string) string
- func FileExists(filePath string) bool
- func FileExistsInPath(fileName string) bool
- func GetLocalIP() string
- func GetPathParts(path string) (dirPath, fileName, absPath string)
- func GetPrefix() string
- func GetThisPathParts() (dirPath, fileName, absPath string)
- func HomeDir() string
- func Install(args ...string)
- func InstallChownRoot(args ...string)
- func InstallDirChownRoot(dirPath string)
- func IsDirEmpty(name string) (bool, error)
- func IsPrefixed() bool
- func LibDirPath() string
- func LibFilePath(fileName string) string
- func LineReader(filePath string) <-chan string
- func LogDirPath() string
- func LogFile(fileName string) (io.Writer, error)
- func LogFilePath(fileName string) string
- func ParseAddress(addr string) (proto string, path string, err error)
- func PidFilePath() string
- func Prefix(p string)
- func PrintVersion(out io.Writer)
- func RandomString(length int) string
- func ReadFileToString(path string) (string, error)
- func ReadPidFile() (int, error)
- func RunDirPath() string
- func StdOutAndLogFile(fileName string) (io.Writer, error)
- func StringInSlice(a string, list []string) bool
- func Trim(text string) string
- func WritePidFile(pid int) error
- func WriteStringToFile(text, path string) error
Constants ¶
View Source
const ( LogDirPathSuffix = "/var/log/rexray" EtcDirPathSuffix = "/etc/rexray" BinDirPathSuffix = "/usr/bin" RunDirPathSuffix = "/var/run/rexray" LibDirPathSuffix = "/var/lib/rexray" UnitFilePath = "/etc/systemd/system/rexray.service" InitFilePath = "/etc/init.d/rexray" EnvFileName = "rexray.env" TrimPattern = `(?s)^\s*(.*?)\s*$` NetworkAdressPattern = `(?i)^((?:(?:tcp|udp|ip)[46]?)|(?:unix(?:gram|packet)?))://(.+)$` LetterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" LetterIndexBits = 6 LetterIndexMask = 1<<LetterIndexBits - 1 LetterIndexMax = 63 / LetterIndexBits )
Variables ¶
This section is empty.
Functions ¶
func BinDirPath ¶
func BinDirPath() string
func BinFilePath ¶
func BinFilePath() string
func EtcDirPath ¶
func EtcDirPath() string
func EtcFilePath ¶
func FileExists ¶
func FileExistsInPath ¶
func GetPathParts ¶
func GetThisPathParts ¶
func GetThisPathParts() (dirPath, fileName, absPath string)
func InstallChownRoot ¶
func InstallChownRoot(args ...string)
func InstallDirChownRoot ¶
func InstallDirChownRoot(dirPath string)
func IsDirEmpty ¶
func IsPrefixed ¶
func IsPrefixed() bool
func LibDirPath ¶
func LibDirPath() string
func LibFilePath ¶
func LineReader ¶
func LogDirPath ¶
func LogDirPath() string
func LogFilePath ¶
func ParseAddress ¶
ParseAddress parses a standard golang network address and returns the protocol and path.
func PidFilePath ¶
func PidFilePath() string
func PrintVersion ¶
func RandomString ¶
func ReadFileToString ¶
func ReadPidFile ¶
func RunDirPath ¶
func RunDirPath() string
func StringInSlice ¶
func Trim ¶
Trim removes all leading and trailing whitespace, including tab, newline, and carriage return characters.
func WritePidFile ¶
func WriteStringToFile ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.