MQTTClient

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ID             string
	SubTopicId     int
	Config         Config
	Connection     mqtt.Client
	Updates        chan int
	ConnectionDone chan struct{}
}

func (*Client) Connect

func (c *Client) Connect()

func (Client) Start

func (c Client) Start(wg *sync.WaitGroup)

func (Client) Subscribe

func (c Client) Subscribe(topic string)

type Config

type Config struct {
	MessageCount     *int
	MessageSize      *int
	Interval         *int
	TargetTopic      *string
	Username         *string
	Password         *string
	Host             *string
	Schedule         *string
	Port             *int
	IdAsSubTopic     *bool
	QoS              *int
	TLSConfigured    bool
	CA               *string
	Cert             *string
	Key              *string
	Insecure         *bool
	MQTTS            *bool
	CleanSession     *bool
	ClientID         *string
	KeepAliveTimeout *int64
}

type Pool

type Pool struct {
	MqttClients []*Client
	SetupDone   chan struct{}
}

func (*Pool) New

func (p *Pool) New(numOfClients *int, clientConfig Config, updates chan int, connectionProgress chan int)

func (*Pool) Start

func (p *Pool) Start(wg *sync.WaitGroup)

Jump to

Keyboard shortcuts

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