# Packages
Package future implements a generic future handling system.
# Functions
ClearRetainedMessage will connect to the specified broker and send an empty retained message to force any already retained message to be cleared.
ClearSession will connect to the specified broker and request a clean session.
New returns a new client that by default uses a fresh MemorySession.
NewConfig creates a new Config using the specified URL.
NewConfigWithClientID creates a new Config using the specified URL and client ID.
NewService allocates and returns a new service.
NewTracker returns a new tracker.
PublishMessage will connect to the specified broker to publish the passed message.
ReceiveMessage will connect to the specified broker and issue a subscription for the specified topic and return the first message received.
# Variables
ErrClientAlreadyConnecting is returned by Connect if another connection attempt is already underway.
ErrClientConnectionDenied is returned to the Callback if the connection has been reject by the broker.
ErrClientExpectedConnack is returned when the first received packet is not a Connack.
ErrClientMissingID is returned by Connect if no ClientID has been provided in the config while requesting to resume a session.
ErrClientMissingPong is returned to the Callback if the broker did not respond in time to a Pingreq.
ErrClientNotConnected is returned by Publish, Subscribe and Unsubscribe if the client is not currently connected.
ErrFailedSubscription is returned when a subscription attempt failed and Config.ValidateSubs has been set to true.
# Structs
A Client connects to a broker and handles the transmission of packets.
A Config holds information about establishing a connection to a broker.
Service is an abstraction for Client that provides a stable interface to the application, while it automatically connects and reconnects clients in the background.
A Tracker keeps track of keep alive intervals.
# Interfaces
A ConnectFuture is returned by the connect method.
Dialer defines the dialer used by a client.
A GenericFuture is returned by publish and unsubscribe methods.
A Session is used to persist incoming and outgoing packets.
A SubscribeFuture is returned by the subscribe methods.