probe/config/path-sensorconfig.go

16 lines
385 B
Go
Raw Normal View History

2018-04-18 14:56:13 +00:00
package config
import (
"path"
2018-04-26 08:39:32 +00:00
ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
2018-04-18 14:56:13 +00:00
)
func SensorConfigContainerDir(name string) string {
return path.Join(ConfigDir(), name)
}
2018-04-26 08:39:32 +00:00
func SensorConfigFilePath(sensorConfig *ocmsc.SensorConfig) string {
2018-07-02 08:44:53 +00:00
return path.Join(SensorConfigContainerDir(sensorConfig.Crawler.MetaCrawlerContainerKey), sensorConfig.SensorID.String())
2018-04-18 14:56:13 +00:00
}