client

package
v2.0.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateConnection

func CreateConnection(_ api.StreamContext) modules.Connection

Types

type Connection

type Connection struct {
	pahoMqtt.Client
	// contains filtered or unexported fields
}

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) Publish

func (conn *Connection) Publish(topic string, qos byte, retained bool, payload any) error

func (*Connection) SetStatusChangeHandler

func (conn *Connection) SetStatusChangeHandler(ctx api.StreamContext, sch api.StatusChangeHandler)

func (*Connection) Status

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL