publisher

package
v0.0.0-...-665db2f Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MqttConfig

type MqttConfig struct {
	Host     string
	Port     int
	User     string
	Password string
	ClientId string
}

type MqttMsg

type MqttMsg struct {
	Topic    string
	Qos      byte
	Retained bool
	Payload  interface{}
}

type Publisher

type Publisher interface {
	Start()
	Stop()
	Connect()
	SetIn(chan types.DataPoint)
	GetIn() chan types.DataPoint
}

Publisher streams data to the outside world

type SimpleConfig

type SimpleConfig struct {
	Mqtt MqttConfig
}

type SimpleSink

type SimpleSink struct {
	In   chan types.DataPoint
	Sink mqttClient
	// contains filtered or unexported fields
}

func NewSimplePublisher

func NewSimplePublisher(spc SimpleConfig) *SimpleSink

func (*SimpleSink) Connect

func (s *SimpleSink) Connect()

func (*SimpleSink) GetIn

func (s *SimpleSink) GetIn() chan types.DataPoint

func (*SimpleSink) SetIn

func (s *SimpleSink) SetIn(in chan types.DataPoint)

func (*SimpleSink) Start

func (s *SimpleSink) Start()

func (*SimpleSink) Stop

func (s *SimpleSink) Stop()

Jump to

Keyboard shortcuts

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