global.go 664 B

1234567891011121314151617181920212223242526272829
  1. package global
  2. import (
  3. "mtp20access/config"
  4. "github.com/go-redis/redis/v8"
  5. "github.com/songzhibin97/gkit/cache/local_cache"
  6. "github.com/spf13/viper"
  7. "github.com/streadway/amqp"
  8. "go.uber.org/zap"
  9. "golang.org/x/sync/singleflight"
  10. "xorm.io/xorm"
  11. )
  12. type RabbitMQ struct {
  13. Connection *amqp.Connection
  14. Channel *amqp.Channel
  15. }
  16. var (
  17. M2A_DB *xorm.Engine
  18. M2A_REDIS *redis.Client
  19. M2A_CONFIG config.Server
  20. M2A_VP *viper.Viper
  21. M2A_LOG *zap.Logger
  22. M2A_RABBITMQ *RabbitMQ
  23. M2A_Concurrency_Control = &singleflight.Group{}
  24. BlackCache local_cache.Cache
  25. )