Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source implements hermod.Source for MQTT brokers using Eclipse Paho. It supports: - Multiple topic subscriptions (comma-separated filters) - QoS 0/1/2 - TLS with system roots and optional InsecureSkipVerify - Auto reconnect with configurable max interval - Graceful shutdown
func NewSource ¶
NewSource constructs a new MQTT source. Expected config keys: - broker_url: e.g. tcp://localhost:1883, ssl://broker:8883, ws://..., wss://... - topics: comma-separated list of topic filters - client_id: optional client identifier - username, password: optional auth - qos: 0|1|2 - clean_session: true|false (default true) - keepalive: duration in seconds (default 30) - tls_insecure_skip_verify: true|false (default false) - max_reconnect_interval: duration (e.g., 30s)
func (*Source) Read ¶
Read blocks until a message arrives or context is done. Returns (nil, nil) on context timeout/cancel.
func (*Source) Sample ¶
Sample connects to the broker, subscribes to the configured topics, and waits for a single message so the UI can preview the payload and surface its keys as available fields for downstream transformation/sink nodes. It uses a dedicated connection with a clean session and a fresh client ID, so it never disturbs the running ingestion consumer; MQTT delivers by broadcast, so sampling is non-destructive and does not consume or skip real data.