27 lines
644 B
Go
27 lines
644 B
Go
package config
|
|
|
|
import (
|
|
log "gitlink.org.cn/cloudream/common/pkgs/logger"
|
|
"gitlink.org.cn/cloudream/common/sdks/storage/cdsapi"
|
|
uopsdk "gitlink.org.cn/cloudream/common/sdks/unifyops"
|
|
c "gitlink.org.cn/cloudream/common/utils/config"
|
|
mymq "gitlink.org.cn/cloudream/scheduler/common/pkgs/mq"
|
|
)
|
|
|
|
type Config struct {
|
|
Logger log.Config `json:"logger"`
|
|
RabbitMQ mymq.Config `json:"rabbitMQ"`
|
|
CloudreamStorage cdsapi.Config `json:"cloudreamStorage"`
|
|
UnifyOps uopsdk.Config `json:"unifyOps"`
|
|
}
|
|
|
|
var cfg Config
|
|
|
|
func Init() error {
|
|
return c.DefaultLoad("collector", &cfg)
|
|
}
|
|
|
|
func Cfg() *Config {
|
|
return &cfg
|
|
}
|