Documentation ¶
Index ¶
- type Client
- func (c *Client) Connect(ctx api.StreamContext) error
- func (c *Client) Disconnect(ctx api.StreamContext)
- func (c *Client) ParseMsg(ctx api.StreamContext, msg any) ([]byte, map[string]any, map[string]string)
- func (c *Client) Publish(ctx api.StreamContext, topic string, qos byte, retained bool, payload []byte, ...) error
- func (c *Client) Subscribe(ctx api.StreamContext, topic string, qos byte, callback client.MessageHandler) error
- func (c *Client) Unsubscribe(ctx api.StreamContext, topic string) error
- type ConnectionConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func Provision ¶
func Provision(ctx api.StreamContext, props map[string]any, onConnect client.ConnectHandler, onConnectLost client.ConnectErrorHandler, _ client.ConnectHandler) (*Client, error)
func (*Client) Disconnect ¶
func (c *Client) Disconnect(ctx api.StreamContext)
func (*Client) Subscribe ¶
func (c *Client) Subscribe(ctx api.StreamContext, topic string, qos byte, callback client.MessageHandler) error
func (*Client) Unsubscribe ¶
func (c *Client) Unsubscribe(ctx api.StreamContext, topic string) error
type ConnectionConfig ¶
type ConnectionConfig struct { Server string `json:"server"` 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.