config.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package config
  2. import (
  3. "github.com/zeromicro/go-zero/rest"
  4. "github.com/zeromicro/go-zero/zrpc"
  5. "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXCore/entity"
  6. )
  7. type Config struct {
  8. rest.RestConf
  9. Webrpcport int64
  10. Gateway struct {
  11. ServerCode string
  12. Etcd []string
  13. }
  14. Core zrpc.RpcClientConf
  15. MgoLogsName string
  16. MgoLogsCount int
  17. DetailMosaicTxt string
  18. SearchMosaic map[string]bool
  19. SearchLog SaveLogConfig
  20. MobileIndexHotKeyLimit int64
  21. MobileIndexHotKeyUnLogin []string
  22. MobileIndexHotKey []string
  23. }
  24. type Db struct {
  25. Mongo entity.Mongo `json:"mongo"`
  26. Redis entity.RedisStuct `json:"redis"`
  27. }
  28. type Routes struct {
  29. ExcludeRoute []string
  30. }
  31. type SaveLogConfig struct {
  32. Name string // 日志名称
  33. CollName string // 保存的coll
  34. MgoSaveCacheSize int // 缓存通道大小
  35. SPSize int // 数据库并发数据
  36. BulkSize int // 每批的数量
  37. TimeAfter int // 定时保存 毫秒
  38. Timeout int // 超时丢弃毫秒
  39. }