Documentation ¶
Index ¶
Constants ¶
View Source
const ( MetadataTopic = "mqtt_topic" MetadataQoS = "mqtt_qos" MetadataRetained = "mqtt_retained" MetadataMessageID = "mqtt_message_id" MetadataDuplicate = "mqtt_duplicate" )
Variables ¶
This section is empty.
Functions ¶
func NewPublisher ¶
NewPublisher creates a new MQTT Publisher
func NewSubscriber ¶
NewSubscriber creates a new MQTT Subscriber
Types ¶
type PubSubRouter ¶
type PubSubRouter struct { Logger *slog.Logger // Subscriber is the Watermill Subscriber to receive messages from MQTT Subscriber message.Subscriber // Publisher is the Watermill Publisher to send messages to Publisher message.Publisher Router *message.Router // contains filtered or unexported fields }
PubSubRouter is a Watermill Router implementation that routes messages to GCP Pub/Sub
func NewPubSubRouter ¶
func NewPubSubRouter(cfg PubSubRouterConfig, logger *slog.Logger) (*PubSubRouter, error)
NewPubSubRouter creates a new PubSubRouter
func (*PubSubRouter) Close ¶
func (r *PubSubRouter) Close() error
type PubSubRouterConfig ¶
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
Publisher is a Watermill Publisher implementation for MQTT
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
Subscriber is a Watermill Subscriber implementation for MQTT
Click to show internal directories.
Click to hide internal directories.