probe/config/path-sensorconfig.go
2018-07-02 21:22:45 +09:00

17 lines
426 B
Go

package config
import (
"path"
ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
"strings"
)
func SensorConfigContainerDir(name string) string {
return path.Join(ConfigDir(), "container", name)
}
func SensorConfigFilePath(sensorConfig *ocmsc.SensorConfig) string {
return path.Join(SensorConfigContainerDir(strings.ToLower(sensorConfig.Crawler.MetaCrawlerContainerKey)), sensorConfig.SensorID.String())
}