Documentation ¶
Index ¶
- func BasicErrJoin(prevErr error, newErr error) error
- func NoopSubsystem() *mockSubsystem
- type Controller
- type Entity
- type HomeoStasisConfig
- type Homeostasis
- type Observation
- type Subsystem
- type SubsystemComposite
- func (s *SubsystemComposite) Load(name string, sub Subsystem)
- func (s *SubsystemComposite) LoadAPI(router *mux.Router)
- func (s *SubsystemComposite) Setup() error
- func (s *SubsystemComposite) Sub(name string) (Subsystem, error)
- func (s *SubsystemComposite) Unload(name string)
- func (s *SubsystemComposite) UnloadAll()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BasicErrJoin ¶
a very basic equivalent of errors.Join, but works for go < 1.2
func NoopSubsystem ¶
func NoopSubsystem() *mockSubsystem
Types ¶
type Controller ¶
type Controller interface { Subsystem(string) (Subsystem, error) Telemetry() telemetry.Telemetry Store() storage.Store LogError(string, string) error DM() *device_manager.DeviceManager }
func TestController ¶
func TestController() (Controller, error)
type HomeoStasisConfig ¶
type Homeostasis ¶
type Homeostasis struct {
// contains filtered or unexported fields
}
func NewHomeostasis ¶
func NewHomeostasis(c Controller, config HomeoStasisConfig) *Homeostasis
func (*Homeostasis) EmitMetric ¶
func (h *Homeostasis) EmitMetric(m string, v float64)
func (*Homeostasis) Sub ¶
func (h *Homeostasis) Sub() Subsystem
func (*Homeostasis) Sync ¶
func (h *Homeostasis) Sync(o *Observation) error
type Observation ¶
type Observation struct { Value float64 `json:"value"` Upper int `json:"up"` Downer int `json:"down"` Time telemetry.TeleTime `json:"time"` // contains filtered or unexported fields }
func NewObservation ¶
func NewObservation(v float64) Observation
type SubsystemComposite ¶
type SubsystemComposite struct {
// contains filtered or unexported fields
}
func NewSubsystemComposite ¶
func NewSubsystemComposite() *SubsystemComposite
func (*SubsystemComposite) Load ¶
func (s *SubsystemComposite) Load(name string, sub Subsystem)
func (*SubsystemComposite) LoadAPI ¶
func (s *SubsystemComposite) LoadAPI(router *mux.Router)
func (*SubsystemComposite) Setup ¶
func (s *SubsystemComposite) Setup() error
func (*SubsystemComposite) Unload ¶
func (s *SubsystemComposite) Unload(name string)
func (*SubsystemComposite) UnloadAll ¶
func (s *SubsystemComposite) UnloadAll()
Click to show internal directories.
Click to hide internal directories.