util

package
v0.2.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2015 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LETTER_BYTES      = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
	LETTER_INDEX_BITS = 6
	LETTER_INDEX_MASK = 1<<LETTER_INDEX_BITS - 1
	LETTER_INDEX_MAX  = 63 / LETTER_INDEX_BITS
)
View Source
const ADDR_PATT = "(?i)^((?:(?:tcp|udp|ip)[46]?)|(?:unix(?:gram|packet)?))://(.+)$"
View Source
const CLILOG = "/var/log/rexray.log"
View Source
const LOGDIR = "/var/log/rexray"
View Source
const LOGFILE = "/var/log/rexray.log"
View Source
const PIDDIR = "/var/run/rexray"
View Source
const PIDFILE = "/var/run/rexray.pid"

Variables

This section is empty.

Functions

func FileExists

func FileExists(filePath string) bool

func FileExistsInPath

func FileExistsInPath(fileName string) bool

func GetLocalIP

func GetLocalIP() string

GetLocalIP returns the non loopback local IP of the host

func GetPathParts

func GetPathParts(path string) (dirPath, fileName, absPath string)

func GetThisPathParts

func GetThisPathParts() (dirPath, fileName, absPath string)

func HomeDir

func HomeDir() string

func LogFile

func LogFile() string

func ParseAddress

func ParseAddress(addr string) (proto string, path string, err error)

func PidFile

func PidFile() string

func RandomString

func RandomString(length int) string

func ReadPidFile

func ReadPidFile() (int, error)

func StringInSlice

func StringInSlice(a string, list []string) bool

func WritePidFile

func WritePidFile(pid int) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL