client

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	SendOrDrop(method string, pkt *mqtt.Publish) error
	SendPubAck(pkt mqtt.Packet) error
	Start(obs mqtt.Observer)
	ResetClient(cfg *mqtt.ClientConfig)
	SetReconnectCallback(callback mqtt.ReconnectCallback)
	io.Closer
}

func NewHTTPClient added in v2.4.0

func NewHTTPClient(ctx context.Context, cfg *mqtt.ClientConfig) (Client, error)

func NewMqttClient

func NewMqttClient(cfg *mqtt.ClientConfig) (Client, error)

type HTTPClient added in v2.4.0

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

func (*HTTPClient) Close added in v2.4.0

func (h *HTTPClient) Close() error

Close closes client

func (*HTTPClient) ResetClient added in v2.4.0

func (h *HTTPClient) ResetClient(cfg *mqtt.ClientConfig)

func (*HTTPClient) SendOrDrop added in v2.4.0

func (h *HTTPClient) SendOrDrop(method string, pkt *mqtt.Publish) error

func (*HTTPClient) SendPubAck added in v2.4.0

func (h *HTTPClient) SendPubAck(pkt mqtt.Packet) error

func (*HTTPClient) SetReconnectCallback added in v2.4.0

func (h *HTTPClient) SetReconnectCallback(callback mqtt.ReconnectCallback)

func (*HTTPClient) Start added in v2.4.0

func (h *HTTPClient) Start(obs mqtt.Observer)

type MqttClient

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

func (*MqttClient) Close

func (m *MqttClient) Close() error

func (*MqttClient) ResetClient added in v2.4.0

func (m *MqttClient) ResetClient(cfg *mqtt.ClientConfig)

func (*MqttClient) SendOrDrop

func (m *MqttClient) SendOrDrop(method string, pkt *mqtt.Publish) error

func (*MqttClient) SendPubAck added in v2.4.0

func (m *MqttClient) SendPubAck(pkt mqtt.Packet) error

func (*MqttClient) SetReconnectCallback added in v2.4.0

func (m *MqttClient) SetReconnectCallback(callback mqtt.ReconnectCallback)

func (*MqttClient) Start

func (m *MqttClient) Start(obs mqtt.Observer)

Jump to

Keyboard shortcuts

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