global.go 482 B

1234567891011121314151617181920
  1. package global
  2. import (
  3. "github.com/go-redis/redis/v8"
  4. "github.com/olivere/elastic/v7"
  5. oplogging "github.com/op/go-logging"
  6. "gorm.io/gorm"
  7. "hongze/hongze_yb/config"
  8. "io"
  9. )
  10. var (
  11. CONFIG config.Config //配置文件
  12. LOG *oplogging.Logger
  13. MYSQL map[string]*gorm.DB //数据库连接配置
  14. MYSQL_LOG io.Writer
  15. DEFAULT_MYSQL *gorm.DB //默认数据库连接配置
  16. Redis *redis.Client //redis链接
  17. EsClient *elastic.Client
  18. )