Documentation ¶
Index ¶
- func CheckExecutable(target string) (string, error)
- func CheckExecutableWithPath(target, path, pathExt string) (string, error)
- func CheckFileWithCallerPath(target string) (string, error)
- func CorrectPathCap(inputPaths []string) ([]string, error)
- func Environ() map[string]string
- func FormatFilePath(f string) string
- func GetAllLinkDir(files []string) []string
- func GetAllLinkFiles(f string) []string
- func GetCaller() string
- func GetExcPath() string
- func GetGlobalDir() string
- func GetHomeDir() string
- func GetIPAddress() (addrList []string)
- func GetLogsDir() string
- func GetPumpCacheDir() string
- func GetRecordDir() string
- func GetRuntimeDir() string
- func IsLocalIP(ip net.IP) bool
- func ListProcess(target string) ([]*process.Process, error)
- func LookPath(target, path, _ string) (string, error)
- func Lz4Compress(src []byte) ([]byte, error)
- func Lz4Uncompress(src []byte, dst []byte) ([]byte, error)
- func Now(t *time.Time)
- func ProcessExist(target string) bool
- func ProcessExistTimeoutAndKill(target string, timeout time.Duration) bool
- func QuoteSpacePath(s string) string
- func SearchProjectID() string
- func UniqArr(arr []string) []string
- func UniqID() string
- func Utf8ToGbk(s []byte) ([]byte, error)
- type PrintLevel
- type ProjectSetting
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckExecutable ¶
CheckExecutable check executable is exist
func CheckExecutableWithPath ¶
CheckExecutableWithPath check executable is exist if path is set, then will look from it, if path is empty, then will look from env PATH pathExt define the PATHEXT in windows
func CheckFileWithCallerPath ¶
try search file in caller path
func CorrectPathCap ¶
func FormatFilePath ¶
func GetAllLinkFiles ¶
func GetIPAddress ¶
func GetIPAddress() (addrList []string)
GetIPAddress get local usable inner ip address
func ListProcess ¶
ListProcess list process by process name
func Lz4Compress ¶
Lz4Compress to implement lz4 compress
func Lz4Uncompress ¶
Lz4Uncompress to implement lz4 uncompress
func ProcessExist ¶
ProcessExist check if target process exsit
func ProcessExistTimeoutAndKill ¶
ProcessExistTimeoutAndKill check target process with name, and kill it after timeout
func QuoteSpacePath ¶
QuoteSpacePath quote path if include space
Types ¶
type PrintLevel ¶
type PrintLevel int32
PrintLevel define log level
const ( PrintFatal PrintLevel = iota PrintError PrintWarn PrintInfo PrintDebug PrintNothing )
define log levels
func (PrintLevel) String ¶
func (p PrintLevel) String() string
String return the string of PrintLevel
type ProjectSetting ¶
type ProjectSetting struct {
ProjectID string `json:"project_id"`
}
ProjectSetting describe the project setting