Versions in this module Expand all Collapse all v0 v0.10.0 Jan 31, 2020 v0.9.0 Dec 23, 2019 Changes in this version + type Client interface + AddRoute func(topic string, callback MessageHandler) + Connect func() Token + Disconnect func(quiesce uint) + IsConnected func() bool + IsConnectionOpen func() bool + OptionsReader func() ClientOptionsReader + Publish func(topic string, qos byte, retained bool, payload interface{}) Token + Subscribe func(topic string, qos byte, callback MessageHandler) Token + SubscribeMultiple func(filters map[string]byte, callback MessageHandler) Token + Unsubscribe func(topics ...string) Token + func NewClient(o *ClientOptions) Client + type ClientOptions struct + Adaptor net.DeviceDriver + AutoReconnect bool + CleanSession bool + ClientID string + ConnectTimeout time.Duration + KeepAlive int64 + MaxReconnectInterval time.Duration + MessageChannelDepth uint + Order bool + Password string + PingTimeout time.Duration + ProtocolVersion uint + ResumeSubs bool + Servers string + Username string + WillEnabled bool + WillPayload []byte + WillQos byte + WillRetained bool + WillTopic string + WriteTimeout time.Duration + func NewClientOptions() *ClientOptions + func (o *ClientOptions) AddBroker(server string) *ClientOptions + func (o *ClientOptions) SetBinaryWill(topic string, payload []byte, qos byte, retained bool) *ClientOptions + func (o *ClientOptions) SetClientID(id string) *ClientOptions + func (o *ClientOptions) SetPassword(p string) *ClientOptions + func (o *ClientOptions) SetUsername(u string) *ClientOptions + func (o *ClientOptions) SetWill(topic string, payload string, qos byte, retained bool) *ClientOptions + type ClientOptionsReader struct + type Message interface + Ack func() + Duplicate func() bool + MessageID func() uint16 + Payload func() []byte + Qos func() byte + Retained func() bool + Topic func() string + type MessageHandler func(Client, Message) + type Token interface + Error func() error + Wait func() bool + WaitTimeout func(time.Duration) bool