di_mqtt.go 310 B

1234567891011121314151617181920
  1. package dep
  2. import (
  3. "go.uber.org/dig"
  4. "kpt-temporary-mqtt/module/mqtt"
  5. )
  6. func DIMqtt() (out MqttDependency) {
  7. container := DI()
  8. if err := container.Invoke(func(c MqttDependency) { out = c }); err != nil {
  9. panic(err)
  10. }
  11. return
  12. }
  13. type MqttDependency struct {
  14. dig.In
  15. DataEventEntry mqtt.DataEvent
  16. }