bilibili-backup/app/service/ops/log-agent/pkg/lancerroute/lancerroute.go

21 lines
332 B
Go
Raw Permalink Normal View History

2019-04-22 10:59:20 +08:00
package lancerroute
type Lancerroute struct {
c *Config
}
var route *Lancerroute
func InitLancerRoute() error {
route = new(Lancerroute)
return route.InitConfig()
}
func GetLancerByLogid(logId string) string {
if d, ok := route.c.LancerRoute[logId]; ok {
return d
}
// lancer-common by default
return "lancer-common"
}