mqtt

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: May 22, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConnectTimeout = time.Second * 60
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MQTTClient

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

func New

func New(config *MQTTConfig) (*MQTTClient, error)

func (*MQTTClient) Close added in v0.1.2

func (c *MQTTClient) Close() error

func (*MQTTClient) Post

func (c *MQTTClient) Post(payload []byte, currentDateString string) error

func (*MQTTClient) PostImageURL

func (c *MQTTClient) PostImageURL(url string) error

func (*MQTTClient) RefreshUpdateTime

func (c *MQTTClient) RefreshUpdateTime(tillNextUpdate int) error

type MQTTConfig

type MQTTConfig struct {
	BrokerURL string `yaml:"broker_url"`
	BaseTopic string `yaml:"base_topic"`
	ChunkSize int    `yaml:"chunk_size"`
}

Jump to

Keyboard shortcuts

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