Documentation ¶
Overview ¶
Package mqtt contains the domain concept definitions needed to support Magistrala MQTT service functionality.
Index ¶
Constants ¶
View Source
const ( LogInfoSubscribed = "subscribed with client_id %s to topics %s" LogInfoUnsubscribed = "unsubscribed client_id %s from topics %s" LogInfoConnected = "connected with client_id %s" LogInfoDisconnected = "disconnected client_id %s and username %s" LogInfoPublished = "published with client_id %s to the topic %s" )
Log message formats.
Variables ¶
View Source
var ( ErrMalformedSubtopic = errors.New("malformed subtopic") ErrClientNotInitialized = errors.New("client is not initialized") ErrMalformedTopic = errors.New("malformed topic") ErrMissingClientID = errors.New("client_id not found") ErrMissingTopicPub = errors.New("failed to publish due to missing topic") ErrMissingTopicSub = errors.New("failed to subscribe due to missing topic") ErrFailedConnect = errors.New("failed to connect") ErrFailedSubscribe = errors.New("failed to subscribe") ErrFailedUnsubscribe = errors.New("failed to unsubscribe") ErrFailedPublish = errors.New("failed to publish") ErrFailedDisconnect = errors.New("failed to disconnect") ErrFailedPublishDisconnectEvent = errors.New("failed to publish disconnect event") ErrFailedParseSubtopic = errors.New("failed to parse subtopic") ErrFailedPublishConnectEvent = errors.New("failed to publish connect event") ErrFailedPublishToMsgBroker = errors.New("failed to publish to magistrala message broker") )
Error wrappers for MQTT errors.
Functions ¶
func NewHandler ¶
func NewHandler(publisher messaging.Publisher, es events.EventStore, logger *slog.Logger, thingsClient grpcThingsV1.ThingsServiceClient, channels grpcChannelsV1.ChannelsServiceClient) session.Handler
NewHandler creates new Handler entity.
Types ¶
Directories ¶
Path | Synopsis |
---|---|
Package events provides the domain concept definitions needed to support mqtt events functionality.
|
Package events provides the domain concept definitions needed to support mqtt events functionality. |
Package mocks contains mocks for testing purposes.
|
Package mocks contains mocks for testing purposes. |
Package tracing provides tracing instrumentation for Magistrala MQTT adapter service.
|
Package tracing provides tracing instrumentation for Magistrala MQTT adapter service. |
Click to show internal directories.
Click to hide internal directories.