12345678910111213141516171819 |
- package cmd
- import (
- "kpt-pasture/config"
- "kpt-pasture/dep"
- "github.com/spf13/cobra"
- )
- var MqttCmd = &cobra.Command{
- Use: "mqtt",
- Short: "mqtt server",
- Run: func(cmd *cobra.Command, args []string) {
- conf := config.Options().Mqtt
- dataEvent := dep.DIMqtt()
- mqttClient := dataEvent.DataEventEntry.NewMqtt(conf)
- dataEvent.DataEventEntry.SubMsg(conf, mqttClient)
- },
- }
|