mqtt

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudConfigResponse

type CloudConfigResponse struct {
	Password    string `json:"password"`
	Username    string `json:"username"`
	BrokerURL   string `json:"broker_url"`
	TopicPrefix string `json:"topic_prefix"`
}

type CloudMQTTConfigurator

type CloudMQTTConfigurator struct {
	// contains filtered or unexported fields
}

func NewCloudMQTTConfigurator

func NewCloudMQTTConfigurator(cloudURL, authKey string) *CloudMQTTConfigurator

func (*CloudMQTTConfigurator) GetConfiguration

func (c *CloudMQTTConfigurator) GetConfiguration(ctx context.Context) *MQTTConfig

type LocalMQTTConfigurator

type LocalMQTTConfigurator struct {
	Host        string
	Password    string
	Username    string
	TopicPrefix string
}

func NewLocalMQTTConfigurator

func NewLocalMQTTConfigurator(host, desktopPSK, desktopID string) *LocalMQTTConfigurator

func (*LocalMQTTConfigurator) GetConfiguration

func (c *LocalMQTTConfigurator) GetConfiguration(ctx context.Context) *MQTTConfig

type MQTTConfig

type MQTTConfig struct {
	Host        string
	Password    string
	Username    string
	TopicPrefix string
}

type MQTTConfigurator

type MQTTConfigurator interface {
	GetConfiguration(ctx context.Context) *MQTTConfig
}

type MQTTSignaler

type MQTTSignaler struct {
	Client mqtt.Client
	// contains filtered or unexported fields
}

func NewMQTTSignaler

func NewMQTTSignaler(configurator MQTTConfigurator) *MQTTSignaler

func (*MQTTSignaler) GetName

func (c *MQTTSignaler) GetName() string

func (*MQTTSignaler) RefreshConfig

func (c *MQTTSignaler) RefreshConfig() *MQTTConfig

func (*MQTTSignaler) Run

func (c *MQTTSignaler) Run(ctx context.Context, desktop api.Desktop) error

Used to open the Signaler, and use this webrtc api to create new sessions

func (*MQTTSignaler) SetNewSessionHandler

func (c *MQTTSignaler) SetNewSessionHandler(h api.NewSessionHandler) error

Jump to

Keyboard shortcuts

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