config.go 524 B

12345678910111213141516171819202122232425262728293031
  1. package config
  2. import (
  3. "github.com/zeromicro/go-zero/zrpc"
  4. )
  5. type Config struct {
  6. zrpc.RpcServerConf
  7. DataSource *mysqlConfig // 手动代码
  8. Mysql string
  9. Redis *RedisConfig
  10. SurvivalTime int
  11. SaveConcurrency int // 消息保存并发数
  12. }
  13. type RedisConfig struct {
  14. Host string
  15. Addr string
  16. Modules string
  17. }
  18. type mysqlConfig struct {
  19. DbName string
  20. Address string
  21. UserName string
  22. PassWord string
  23. MaxOpenConns int
  24. MaxIdleConns int
  25. }
  26. var ConfigJson Config