Versions in this module Expand all Collapse all v1 v1.0.2 May 9, 2023 v1.0.1 Mar 17, 2023 v1.0.0 Mar 25, 2021 Changes in this version type Config + PauseTimeout time.Duration v1.0.0-rc Mar 14, 2021 v0 v0.7.0 Mar 2, 2021 Changes in this version + const ErrAuth + const ErrAuthBad + const ErrClientID + const ErrProtocolLevel + const ErrUnavailable + var ErrAbandoned = errors.New("mqtt: request abandoned after submission") + var ErrBreak = errors.New("mqtt: connection lost while awaiting response") + var ErrCanceled = errors.New("mqtt: request canceled before submission") + var ErrClosed = errors.New("mqtt: client closed") + var ErrDown = errors.New("mqtt: connection unavailable") + var ErrMax = errors.New("mqtt: maximum number of pending requests reached") + func IsConnectionRefused(err error) bool + func IsDeny(err error) bool + type BigMessage struct + Size int + Topic string + func (e *BigMessage) Error() string + func (e *BigMessage) ReadAll() ([]byte, error) + type Client struct + func AdoptSession(p Persistence, c *Config) (client *Client, warn []error, fatal error) + func InitSession(clientID string, p Persistence, c *Config) (*Client, error) + func VolatileSession(clientID string, c *Config) (*Client, error) + func (c *Client) Close() error + func (c *Client) Disconnect(quit <-chan struct{}) error + func (c *Client) Offline() <-chan struct{} + func (c *Client) Online() <-chan struct{} + func (c *Client) Ping(quit <-chan struct{}) error + func (c *Client) Publish(quit <-chan struct{}, message []byte, topic string) error + func (c *Client) PublishAtLeastOnce(message []byte, topic string) (exchange <-chan error, err error) + func (c *Client) PublishAtLeastOnceRetained(message []byte, topic string) (exchange <-chan error, err error) + func (c *Client) PublishExactlyOnce(message []byte, topic string) (exchange <-chan error, err error) + func (c *Client) PublishExactlyOnceRetained(message []byte, topic string) (exchange <-chan error, err error) + func (c *Client) PublishRetained(quit <-chan struct{}, message []byte, topic string) error + func (c *Client) ReadSlices() (message, topic []byte, err error) + func (c *Client) Subscribe(quit <-chan struct{}, topicFilters ...string) error + func (c *Client) SubscribeLimitAtLeastOnce(quit <-chan struct{}, topicFilters ...string) error + func (c *Client) SubscribeLimitAtMostOnce(quit <-chan struct{}, topicFilters ...string) error + func (c *Client) Unsubscribe(quit <-chan struct{}, topicFilters ...string) error + type Config struct + AtLeastOnceMax int + CleanSession bool + ExactlyOnceMax int + KeepAlive uint16 + Password []byte + UserName string + Will struct{ ... } + WireTimeout time.Duration + type Dialer func(ctx context.Context) (net.Conn, error) + func NewDialer(network, address string) Dialer + func NewTLSDialer(network, address string, config *tls.Config) Dialer + type Persistence interface + Delete func(key uint) error + List func() (keys []uint, err error) + Load func(key uint) ([]byte, error) + Save func(key uint, value net.Buffers) error + func FileSystem(dir string) Persistence + type SubscribeError []string + func (e SubscribeError) Error() string