config.go 842 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package config
  2. import (
  3. "jyBXSubscribe/entity"
  4. "github.com/zeromicro/go-zero/rest"
  5. "github.com/zeromicro/go-zero/zrpc"
  6. )
  7. type Config struct {
  8. rest.RestConf
  9. AppId int64
  10. Webrpcport int64
  11. Gateway struct {
  12. ServerCode string
  13. Etcd []string
  14. }
  15. Subscribe zrpc.RpcClientConf
  16. MgoLogsName string
  17. MgoLogsCount int
  18. SubscribeUpdateLog SaveLogConfig
  19. }
  20. type Db struct {
  21. Mongo entity.Mongo `json:"mongo"`
  22. }
  23. type Routes struct {
  24. ExcludeRoute []string
  25. }
  26. type SaveLogConfig struct {
  27. Name string // 日志名称
  28. CollName string // 保存的coll
  29. MgoSaveCacheSize int // 缓存通道大小
  30. SPSize int // 数据库并发数据
  31. BulkSize int // 每批的数量
  32. TimeAfter int // 定时保存 毫秒
  33. Timeout int // 超时丢弃毫秒
  34. }