Documentation
¶
Overview ¶
Package mqtt provides a real-time MQTT-based interface for PostgreSQL, similar to how PostgREST exposes PostgreSQL over HTTP.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents an MQTT client with PostgREST forwarding capabilities.
func NewClient ¶
func NewClient(opts *mqtt.ClientOptions, logger ...*zap.Logger) *Client
NewClient creates a new MQTT client with the given options and logger.
func (*Client) Disconnect ¶
func (c *Client) Disconnect()
Disconnect closes the connection to the MQTT broker.
type ClientOptions ¶
type ClientOptions struct {
Store mqtt.Store
OnConnectAttempt mqtt.ConnectionAttemptHandler
CustomOpenConnectionFn mqtt.OpenConnectionFunc
DefaultPublishHandler mqtt.MessageHandler
CredentialsProvider mqtt.CredentialsProvider
HTTPHeaders http.Header
Dialer *net.Dialer
WebsocketOptions *mqtt.WebsocketOptions
OnConnect mqtt.OnConnectHandler
OnConnectionLost mqtt.ConnectionLostHandler
OnReconnecting mqtt.ReconnectHandler
TLSConfig *tls.Config
ClientID string `json:"clientID"`
WillTopic string
Username string `json:"username"`
Password string `json:"password"`
Servers []*url.URL `json:"servers"`
WillPayload []byte
WriteTimeout time.Duration
ConnectRetryInterval time.Duration
MaxResumePubInFlight int
MessageChannelDepth uint
MaxReconnectInterval time.Duration
ConnectTimeout time.Duration
PingTimeout time.Duration
KeepAlive int64
ProtocolVersion uint
WillRetained bool
AutoReconnect bool
ResumeSubs bool
WillQos byte
WillEnabled bool
ConnectRetry bool
Order bool
CleanSession bool
AutoAckDisabled bool
}
type Config ¶
type Config struct {
Servers []string `json:"servers"`
TopicPrefix string `json:"topicPrefix"`
ClientOptions `json:"clientOptions"`
}
type PeerMQTT ¶
PeerMQTT implements the source and sink functionality for MQTT
func (*PeerMQTT) Disconnect ¶
func (*PeerMQTT) Type ¶
func (p *PeerMQTT) Type() pipeline.ConnectorType
Click to show internal directories.
Click to hide internal directories.