probe/config/path-container.go

22 lines
587 B
Go
Raw Normal View History

2018-04-18 14:56:13 +00:00
package config
import (
"fmt"
"path"
"strings"
ocpcc "git.loafle.net/overflow/commons-go/probe/constants"
)
func ContainerPIDFilePath(containerType ocpcc.ContainerType) string {
return path.Join(PIDDir(), fmt.Sprintf("%s.pid", strings.ToLower(containerType.String())))
}
func ContainerBinFilePath(containerType ocpcc.ContainerType) string {
return path.Join(BinDir(), ocpcc.ContainerBinFileName[containerType])
}
func ContainerLoggingConfigFilePath(containerType ocpcc.ContainerType) string {
return path.Join(BinDir(), ocpcc.ContainerLoggingConfigFileName[containerType])
}