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-07-02 12:22:45 +00:00
|
|
|
"strings"
|
2018-04-18 14:56:13 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func SensorConfigContainerDir(name string) string {
|
2018-07-02 12:22:45 +00:00
|
|
|
return path.Join(ConfigDir(), "container", name)
|
2018-04-18 14:56:13 +00:00
|
|
|
}
|
|
|
|
|
2018-04-26 08:39:32 +00:00
|
|
|
func SensorConfigFilePath(sensorConfig *ocmsc.SensorConfig) string {
|
2018-07-02 12:22:45 +00:00
|
|
|
return path.Join(SensorConfigContainerDir(strings.ToLower(sensorConfig.Crawler.MetaCrawlerContainerKey)), sensorConfig.SensorID.String())
|
2018-04-18 14:56:13 +00:00
|
|
|
}
|