modules

package
v0.0.0-...-dc1fef4 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Modules = map[string]ModuleBuilder{}

Functions

func Register

func Register(name string, builder ModuleBuilder)

Register stores a builder function into the registy for external access. Register() can be called from init() on a module in this package and will automatically register a module.

Types

type HeatingModule

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

func (*HeatingModule) Start

func (c *HeatingModule) Start() error

func (*HeatingModule) Stop

func (c *HeatingModule) Stop() error

type Module

type Module interface {
	Start() error
	Stop() error
}

Interface for the different modules being

func NewHeatingModule

func NewHeatingModule(mqttClient mqtt.Client, heatingConfig []data.HeatingConfig, config *config.Config) Module

type ModuleBuilder

type ModuleBuilder func(mqtt.Client, []data.HeatingConfig, *config.Config) Module

Jump to

Keyboard shortcuts

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