config.go 863 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package config
  2. import (
  3. "github.com/zeromicro/go-zero/rest"
  4. "github.com/zeromicro/go-zero/zrpc"
  5. "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. }
  21. type Db struct {
  22. Mongo entity.Mongo `json:"mongo"`
  23. }
  24. type Routes struct {
  25. ExcludeRoute []string
  26. }
  27. type SaveLogConfig struct {
  28. Name string // 日志名称
  29. CollName string // 保存的coll
  30. MgoSaveCacheSize int // 缓存通道大小
  31. SPSize int // 数据库并发数据
  32. BulkSize int // 每批的数量
  33. TimeAfter int // 定时保存 毫秒
  34. Timeout int // 超时丢弃毫秒
  35. }