probe/config/path-sensorconfig.go

16 lines
392 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-04-18 14:56:13 +00:00
return path.Join(SensorConfigContainerDir(sensorConfig.Crawler.Container), sensorConfig.Crawler.Name, sensorConfig.ID.String())
}