# Functions
AuthFromPacketAuth takes a packets library Auth and returns a paho library Auth.
AuthResponseFromPacketAuth takes a packets library Auth and returns a paho library AuthResponse.
AuthResponseFromPacketDisconnect takes a packets library Disconnect and returns a paho library AuthResponse.
BoolToByte is a helper function that take a bool and returns a pointer to a byte of value 1 if true or 0 if false.
Byte is a helper function that take a byte and returns a pointer to a byte of that value.
ConnackFromPacketConnack takes a packets library Connack and returns a paho library Connack.
ConnectFromPacketConnect takes a packets library Connect and returns a paho library Connect.
DefaultPingerWithCustomFailHandler returns an instance of the default Pinger but with a custom PingFailHandler that is called when the client has not received a response to a PingRequest within the appropriate amount of time.
DisconnectFromPacketDisconnect takes a packets library Disconnect and returns a paho library Disconnect.
NewClient is used to create a new default instance of an MQTT client.
NewSingleHandlerRouter instantiates and returns an instance of a SingleHandlerRouter.
NewStandardRouter instantiates and returns an instance of a StandardRouter.
PublishFromPacketPublish takes a packets library Publish and returns a paho library Publish.
PublishResponseFromPuback takes a packets library Puback and returns a paho library PublishResponse.
PublishResponseFromPubcomp takes a packets library Pubcomp and returns a paho library PublishResponse.
PublishResponseFromPubrec takes a packets library Pubrec and returns a paho library PublishResponse.
SubackFromPacketSuback takes a packets library Suback and returns a paho library Suback.
Uint16 is a helper function that take a uint16 and returns a pointer to a uint16 of that value.
Uint32 is a helper function that take a uint32 and returns a pointer to a uint32 of that value.
UnsubackFromPacketUnsuback takes a packets library Unsuback and returns a paho library Unsuback.
UserPropertiesFromPacketUser converts a slice of packets.User to an instance of UserProperties for easier consumption within the client library.
# Variables
No description provided by the author
ErrorMidsExhausted is returned from Request() when there are no free message ids to be used.
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
AuthResponse is a represenation of the response to an Auth packet.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CPContext is the struct that is used to return responses to ControlPackets that have them, eg: the suback to a subscribe.
No description provided by the author
No description provided by the author
MemoryPersistence is an implementation of a Persistence that stores the ControlPackets in memory using a map.
MIDs is the default MIDService provided by this library.
No description provided by the author
PingHandler is the library provided default Pinger.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SingleHandlerRouter is a library provided implementation of a Router that stores only a single MessageHandler and invokes this MessageHandler for all received Publishes.
StandardRouter is a library provided implementation of a Router that allows for unique and multiple MessageHandlers per topic.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SubscribeProperties is a struct of the properties that can be set for a Subscribe packet.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
UserProperty is a struct for the user provided values permitted in the properties section.
No description provided by the author
No description provided by the author
# Interfaces
Auther is the interface for something that implements the extended authentication flows in MQTT v5.
No description provided by the author
MIDService defines the interface for a struct that handles the relationship between message ids and CPContexts Request() takes a *CPContext and returns a uint16 that is the messageid that should be used by the code that called Request() Get() takes a uint16 that is a messageid and returns the matching *CPContext that the MIDService has associated with that messageid Free() takes a uint16 that is a messageid and instructs the MIDService to mark that messageid as available for reuse Clear() resets the internal state of the MIDService.
Persistence is an interface of the functions for a struct that is used to persist ControlPackets.
Pinger is an interface of the functions for a struct that is used to manage sending PingRequests and responding to PingResponses Start() takes a net.Conn which is a connection over which an MQTT session has already been established, and a time.Duration of the keepalive setting passed to the server when the MQTT session was established.
Router is an interface of the functions for a struct that is used to handle invoking MessageHandlers depending on the the topic the message was published on.
# Type aliases
MessageHandler is a type for a function that is invoked by a Router when it has received a Publish.
No description provided by the author
PingFailHandler is a type for the function that is invoked when we have sent a Pingreq to the server and not received a Pingresp within 1.5x our pingtimeout.
UserProperties is a slice of UserProperty.