mqtt.go 424 B

12345678910111213141516171819
  1. package cmd
  2. import (
  3. "github.com/spf13/cobra"
  4. "kpt-temporary-mqtt/config"
  5. "kpt-temporary-mqtt/dep"
  6. )
  7. // mqttCmd represents the mqtt command
  8. var mqttCmd = &cobra.Command{
  9. Use: "mqtt",
  10. Short: "mqtt",
  11. Run: func(cmd *cobra.Command, args []string) {
  12. configOption := config.Options()
  13. dataEvent := dep.DIMqtt()
  14. dataEvent.DataEventEntry.NewMqtt(configOption)
  15. dataEvent.DataEventEntry.SubMsgLog(configOption)
  16. },
  17. }