mqtt

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PingTimeout       = 1 * time.Second
	ReconnectInterval = 10 * time.Second
	DisconnectTimeout = 250
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	URL       string        `koanf:"url"`
	ClientID  string        `koanf:"clientid"`
	Username  string        `koanf:"username"`
	Password  string        `koanf:"password"`
	KeepAlive time.Duration `koanf:"keepalive"`
}

type MQTT

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

MQTT is a plugin for the saf app. this plugin consumes event and publish them over mqtt.

func (*MQTT) Init

func (p *MQTT) Init(logger *zap.Logger, tracer trace.Tracer, cfg interface{})

func (*MQTT) Name

func (p *MQTT) Name() string

func (*MQTT) Run

func (p *MQTT) Run()

func (*MQTT) SetChannel

func (p *MQTT) SetChannel(c <-chan model.ChanneledEvent)

Jump to

Keyboard shortcuts

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