Documentation ¶
Overview ¶
Package gateway implements a MQTT-SN version 1.2 transparent gateway with optional DTLS encryption.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cancelled = errors.New("transaction cancelled")
View Source
var ErrIllegalPacketWhenDisconnected = errors.New("illegal packet in disconnected state")
View Source
var ErrMqttConnClosed = errors.New("MQTT broker closed connection")
View Source
var ErrTopicIDsExhausted = errors.New("no more TopicIDs available")
View Source
var Shutdown = errors.New("clean shutdown")
This error is used to shut down the handler from a goroutine. It does not signalize error.
Functions ¶
This section is empty.
Types ¶
type Gateway ¶
type Gateway struct {
// contains filtered or unexported fields
}
func NewGateway ¶
func NewGateway(log util.Logger, cfg *GatewayConfig) *Gateway
type GatewayConfig ¶
type GatewayConfig struct { MqttBrokerAddress *net.TCPAddr MqttConnectionTimeout time.Duration MqttUser *string MqttPassword []byte UseDTLS bool SelfSigned bool Certificate *tls.Certificate PrivateKey crypto.PrivateKey PerformanceLogTime time.Duration PredefinedTopics topics.PredefinedTopics AuthEnabled bool // TRetry in MQTT-SN specification RetryDelay time.Duration // NRetry in MQTT-SN specification RetryCount uint }
Click to show internal directories.
Click to hide internal directories.