Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configuration ¶
type Configuration struct {
Broker string `json:"mqtt-broker"`
DebugMQTT bool `json:"mqtt-debug"`
Verbose bool `json:"verbose"`
}
func GetConfig ¶
func GetConfig() Configuration
type Consumer ¶
func GetConsumers ¶
type Messanger ¶
Messanger allows a message consumer to provide a callback to specific message paths
func GetMessanger ¶
func GetMessanger() *Messanger
type Msg ¶
type Msg struct {
Station string `json:"station"`
Sensor string `json:"sensor"`
Time int64 `json:"time"`
Data []byte `json:"-"`
}
func (Msg) ToMsgFloat64 ¶
func (m Msg) ToMsgFloat64() (m64 MsgFloat64)
type MsgFloat64 ¶
type Publisher ¶
type Publisher struct {
Path string
Period time.Duration
// contains filtered or unexported fields
}
Publisher periodically reads from an io.Reader then publishes that value to a corresponding channel
func NewPublisher ¶
type Subscriber ¶
type Subscriber struct {
ID string
Path string
mqtt.MessageHandler
Consumers []Consumer
}
func (*Subscriber) String ¶
func (sub *Subscriber) String() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.