overflow_probes/config/config.go
crusader a3ad29ff73 ing
2018-03-27 00:14:19 +09:00

48 lines
838 B
Go

package config
import (
"path"
ooccp "git.loafle.net/overflow/overflow_commons_go/config/probe"
)
var (
ConfigDir *string
ConfigFilePath *string
EncryptionKey *string
Config *ooccp.Config
)
func RootDirPath() string {
return Config.Paths["root"]
}
func BinDirPath() string {
return path.Join(RootDirPath(), ooccp.PathBin)
}
func ConfigDirPath() string {
return path.Join(RootDirPath(), ooccp.PathConfig)
}
func SensorConfigDirPath() string {
return path.Join(RootDirPath(), ooccp.PathSensorConfig)
}
func JREDirPath() string {
return path.Join(RootDirPath(), ooccp.PathJRE)
}
func JavaBinPath() string {
return path.Join(JREDirPath(), "bin", "java")
}
func LogsDirPath() string {
return path.Join(RootDirPath(), ooccp.PathLogs)
}
func PIDDirPath() string {
return path.Join(RootDirPath(), ooccp.PathPID)
}