mqttClient

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.7.1

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

func RunClient added in v0.7.1

func RunClient(cfg Config) (*Client, error)

func (*Client) Config added in v0.7.1

func (c *Client) Config() Config

func (*Client) Shutdown added in v0.7.1

func (c *Client) Shutdown()

type ClientPool added in v0.7.1

type ClientPool struct {
	Clients      map[string]*Client
	ClientsMutex sync.RWMutex
}

func RunPool added in v0.7.1

func RunPool() (pool *ClientPool)

func (*ClientPool) AddClient added in v0.7.1

func (p *ClientPool) AddClient(client *Client)

func (*ClientPool) GetClient added in v0.7.1

func (p *ClientPool) GetClient(clientName string) *Client

func (*ClientPool) RemoveClient added in v0.7.1

func (p *ClientPool) RemoveClient(client Client)

func (*ClientPool) Shutdown added in v0.7.1

func (p *ClientPool) Shutdown()

type Config

type Config interface {
	Name() string
	Broker() string
	User() string
	Password() string
	ClientId() string
	Qos() byte
	TopicPrefix() string
	AvailabilityTopic() string
	LogDebug() bool
}

Jump to

Keyboard shortcuts

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