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.
|
- package config
-
- import (
- "gitlink.org.cn/cloudream/common/pkgs/distlock"
- "gitlink.org.cn/cloudream/common/pkgs/logger"
- "gitlink.org.cn/cloudream/common/utils/config"
- "gitlink.org.cn/cloudream/common/utils/ipfs"
- stgmq "gitlink.org.cn/cloudream/storage-common/pkgs/mq"
- )
-
- type Config struct {
- GRPCPort int `json:"grpcPort"`
- ECPacketSize int64 `json:"ecPacketSize"`
- MaxRepCount int `json:"maxRepCount"`
- LocalIP string `json:"localIP"`
- ExternalIP string `json:"externalIP"`
- Logger logger.Config `json:"logger"`
- RabbitMQ stgmq.Config `json:"rabbitMQ"`
- IPFS *ipfs.Config `json:"ipfs"` // 此字段非空代表客户端上存在ipfs daemon
- DistLock distlock.Config `json:"distlock"`
- }
-
- var cfg Config
-
- func Init() error {
- return config.DefaultLoad("client", &cfg)
- }
-
- func Cfg() *Config {
- return &cfg
- }
|