Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidNodeName node name does not follow requirements ErrInvalidNodeName = errors.New("node name is invalid") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { MQTT configuration.MqttConfig Acceptor configuration.AcceptorConfig // Configuration of persistence provider Persistence persistence.IFace // OnDuplicate notify if there is attempt connect client with id that already exists and active // If not not set than defaults to mock function OnDuplicate func(string, bool) // TransportStatus user provided callback to track transport status // If not set than defaults to mock function TransportStatus func(id string, status string) Health healthcheck.Checks // NodeName NodeName string }
Config configuration of the MQTT server
type Server ¶
type Server interface { // ListenAndServe configures transport according to provided config // This is non blocking function. It returns nil if listener started // or error if any happened during configuration. // Transport status reported over TransportStatus callback in server configuration ListenAndServe(interface{}) error // Shutdown terminates the server by shutting down all the client connections and closing // configured listeners. It does full clean up of the resources and Shutdown() error }
Server server API
Click to show internal directories.
Click to hide internal directories.