modules

package
v0.0.0-...-9d63270 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: MIT Imports: 11 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 MeterMqttModule

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

func (*MeterMqttModule) Eligible

func (mm *MeterMqttModule) Eligible() bool

func (*MeterMqttModule) Start

func (mm *MeterMqttModule) Start() error

func (*MeterMqttModule) Stop

func (mm *MeterMqttModule) Stop() error

type MeterPostgresModule

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

func (*MeterPostgresModule) Eligible

func (mm *MeterPostgresModule) Eligible() bool

func (*MeterPostgresModule) Start

func (mm *MeterPostgresModule) Start() error

func (*MeterPostgresModule) Stop

func (mm *MeterPostgresModule) Stop() error

type Module

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

Interface for the different modules being

func NewMeterMqttModule

func NewMeterMqttModule(mqttClient mqtt.Client, _ postgres.Client, climkitClient climkit.Client, config *config.Config) Module

func NewMeterPostgresModule

func NewMeterPostgresModule(_ mqtt.Client, postgresClient postgres.Client, climkitClient climkit.Client, config *config.Config) Module

Jump to

Keyboard shortcuts

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