mqttv1

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL