global.go 614 B

1234567891011121314151617181920212223
  1. package global
  2. import (
  3. "confrontation-training/config"
  4. "confrontation-training/models/gateway"
  5. mqtt "github.com/eclipse/paho.mqtt.golang"
  6. "github.com/gohutool/log4go"
  7. "github.com/r3labs/sse/v2"
  8. "gorm.io/gorm"
  9. )
  10. var (
  11. Config config.Config
  12. Db *gorm.DB
  13. SseClientDevice *sse.Client
  14. SseClientData *sse.Client
  15. DeviceMap map[string]gateway.DeviceInfo
  16. EmqClient mqtt.Client
  17. EmqConfig config.EmqConfig
  18. Log4J log4go.Logger
  19. GatewayList map[string]gateway.GatewayInfo
  20. ConnectedDeviceMap map[string]gateway.ConnectedDevice
  21. )