Documentation ¶
Index ¶
- type MQTTBrokerV1
- func (m *MQTTBrokerV1) Connect() error
- func (m *MQTTBrokerV1) Disconnect() error
- func (m *MQTTBrokerV1) Marshal() string
- func (m *MQTTBrokerV1) Publish(topic string, msg *broker.Message, opt ...broker.PublishOption) error
- func (m *MQTTBrokerV1) String() string
- func (m *MQTTBrokerV1) Subscribe(topics []string, callBack broker.CallBack, opt ...broker.SubscribeOption) (broker.Subscriber, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MQTTBrokerV1 ¶
type MQTTBrokerV1 struct { sync.Once URI string // mqtt[s]://[username][:password]@host.domain[:port] CID string // client id WT string // will topic WP string // will payload WR bool // will retain WQ byte // will qos C bool // clean session , for subscribe CACertFile string CertFile string KeyFile string Debug bool Insecure bool Logger logger.Logger // contains filtered or unexported fields }
func (*MQTTBrokerV1) Connect ¶
func (m *MQTTBrokerV1) Connect() error
func (*MQTTBrokerV1) Disconnect ¶
func (m *MQTTBrokerV1) Disconnect() error
func (*MQTTBrokerV1) Marshal ¶
func (m *MQTTBrokerV1) Marshal() string
func (*MQTTBrokerV1) Publish ¶
func (m *MQTTBrokerV1) Publish(topic string, msg *broker.Message, opt ...broker.PublishOption) error
Publish
func (*MQTTBrokerV1) String ¶
func (m *MQTTBrokerV1) String() string
func (*MQTTBrokerV1) Subscribe ¶
func (m *MQTTBrokerV1) Subscribe(topics []string, callBack broker.CallBack, opt ...broker.SubscribeOption) (broker.Subscriber, error)
Subscribe
Click to show internal directories.
Click to hide internal directories.