[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[paho-dev] Go client update
|
Today I've pushed some changes and merged the develop branch with the
master branch for the Paho Go client. This is to try and get people
looking at/using the API in preparation for a 1.0 release.
There are breaking API changes between what was previously in the master
branch and what is in it now, if you have current programs that relied
on the previous version and resync the code they will not compile.
There is also some new function;
The client has an option (default true) to do automatic reconnection
when the connection is lost. The onConnectionLost callback is still
triggered when a loss is detected, and onConnect is called when the
client reconnects, it uses an exponential backoff up to a maximum wait
time (default 10 mins)
Receipts have been replaced with Tokens, these are returned on Connect,
Subscribe, Unsubscribe, Publish and Disconnect, they have functions of
Wait() and WaitTimeout(), Wait() will return once the required flows
related to the call have completed, or an error has been caught.
WaitTimeout() will return as above or when the Timer triggers.
Additionally Tokens have Error() which will return an error or nil.
The MQTT packet definitions and implementation have been put into their
own library for the use of other developers who want to make use of
those and not the whole client library
The client supports MQTT 3.1.1 and uses this by default with an auto
fallback to MQTT 3.1
All samples have been updated to the new API to give examples of how to
use the client.
I have also updated the code so it passes the golint tool.
I appreciate any feedback, comments or code contributions.
Thanks,
Al