shared

package
v0.0.0-...-db03bfd Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package shared contains shared code between the controller and the device(s).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Home

func Home() string

Home returns the home directory even when cross compiled and panics on failure.

When cross compiling, user.Current() fails.

func Hostname

func Hostname() string

Hostname is like os.Hostname() but caches the value and panics on failure.

func InitState

func InitState(bus msgbus.Bus, state *periph.State)

InitState initializes the MQTT node state.

func Retained

func Retained(b msgbus.Bus, topic string, payload []byte)

Retained sets a retained message.

func RetainedStr

func RetainedStr(b msgbus.Bus, topic, payload string)

RetainedStr sets a retained message.

func WatchFile

func WatchFile() error

WatchFile returns when the process' executable is modified or interrupt is set.

Types

This section is empty.

Jump to

Keyboard shortcuts

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