Documentation ¶
Index ¶
- func CreateConnection(_ api.StreamContext) modules.Connection
- type Connection
- func (conn *Connection) Close(ctx api.StreamContext) error
- func (conn *Connection) DetachSub(ctx api.StreamContext, props map[string]any)
- func (conn *Connection) Dial(ctx api.StreamContext) error
- func (conn *Connection) GetId(ctx api.StreamContext) string
- func (conn *Connection) Ping(ctx api.StreamContext) error
- func (conn *Connection) Provision(ctx api.StreamContext, conId string, props map[string]any) error
- func (conn *Connection) Publish(topic string, qos byte, retained bool, payload any) error
- func (conn *Connection) SetStatusChangeHandler(ctx api.StreamContext, sch api.StatusChangeHandler)
- func (conn *Connection) Status(_ api.StreamContext) modules.ConnectionStatus
- func (conn *Connection) Subscribe(topic string, qos byte, callback pahoMqtt.MessageHandler) error
- type ConnectionConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateConnection ¶
func CreateConnection(_ api.StreamContext) modules.Connection
Types ¶
type Connection ¶
func (*Connection) Close ¶
func (conn *Connection) Close(ctx api.StreamContext) error
func (*Connection) DetachSub ¶
func (conn *Connection) DetachSub(ctx api.StreamContext, props map[string]any)
func (*Connection) Dial ¶
func (conn *Connection) Dial(ctx api.StreamContext) error
func (*Connection) GetId ¶
func (conn *Connection) GetId(ctx api.StreamContext) string
func (*Connection) Ping ¶
func (conn *Connection) Ping(ctx api.StreamContext) error
func (*Connection) Provision ¶
func (conn *Connection) Provision(ctx api.StreamContext, conId string, props map[string]any) error
func (*Connection) SetStatusChangeHandler ¶
func (conn *Connection) SetStatusChangeHandler(ctx api.StreamContext, sch api.StatusChangeHandler)
func (*Connection) Status ¶
func (conn *Connection) Status(_ api.StreamContext) modules.ConnectionStatus
func (*Connection) Subscribe ¶
func (conn *Connection) Subscribe(topic string, qos byte, callback pahoMqtt.MessageHandler) error
type ConnectionConfig ¶
type ConnectionConfig struct { Server string `json:"server"` PVersion string `json:"protocolVersion"` ClientId string `json:"clientid"` Uname string `json:"username"` Password string `json:"password"` // contains filtered or unexported fields }
func ValidateConfig ¶
func ValidateConfig(props map[string]any) (*ConnectionConfig, error)
Click to show internal directories.
Click to hide internal directories.