app

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClientConnection

func CreateClientConnection(brokerAddr string, wg *sync.WaitGroup) (MQTT.Client, error)

CreateClientConnection connects to a MQTT (e.g. Mosquitto) service and returns a client struct TODO: Rather than using a sync.WaitGroup, a `OnConnect` handler should be passed in... soon...

Types

type Config

type Config struct {
	DeviceFile string
	Hostname   string
	Port       int
}

Config contains the config parameters for the entire application

func CreateConfiguration

func CreateConfiguration() (Config, error)

CreateConfiguration parses commandline arguments and returns `Config` struct

func (Config) BrokerAddr

func (c Config) BrokerAddr() string

BrokerAddr generates a connection string from hostname/port

Jump to

Keyboard shortcuts

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