You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

config.go 947 B

1234567891011121314151617181920212223242526272829
  1. package config
  2. import (
  3. "gitlink.org.cn/cloudream/common/pkgs/distlock"
  4. log "gitlink.org.cn/cloudream/common/pkgs/logger"
  5. "gitlink.org.cn/cloudream/common/pkgs/mq"
  6. c "gitlink.org.cn/cloudream/common/utils/config"
  7. db "gitlink.org.cn/cloudream/jcs-pub/common/pkgs/db2/config"
  8. )
  9. type Config struct {
  10. AccessStatHistoryAmount float64 `json:"accessStatHistoryAmount"`
  11. ECFileSizeThreshold int64 `json:"ecFileSizeThreshold"`
  12. HubUnavailableSeconds int `json:"hubUnavailableSeconds"` // 如果节点上次上报时间超过这个值,则认为节点已经不可用
  13. Logger log.Config `json:"logger"`
  14. DB db.Config `json:"db"`
  15. RabbitMQ mq.Config `json:"rabbitMQ"`
  16. DistLock distlock.Config `json:"distlock"`
  17. }
  18. var cfg Config
  19. func Init() error {
  20. return c.DefaultLoad("scanner", &cfg)
  21. }
  22. func Cfg() *Config {
  23. return &cfg
  24. }

本项目旨在将云际存储公共基础设施化,使个人及企业可低门槛使用高效的云际存储服务(安装开箱即用云际存储客户端即可,无需关注其他组件的部署),同时支持用户灵活便捷定制云际存储的功能细节。