Module config

Stack.Toggle config

Stack.Toggle config is a monolithic configuration expressed as JSON object. On Stack.Toggle it is converted and saved as UCI configuration file.

Set and get

Toggle's config can be backuped and restored using runbook/updated. Handle:

  • config_get_v1 - backup
  • config_set_v1 - restore

Config can also be set and get using NATS request. Use NatsConfigSub subject for both set and get:

io.<SN>.updated.config

Replace <SN> with Toggle's serial number.

To set config use config JSON as payload. To get config use empty string payload or send ConfigRequest with request type "get" as payload.

Config structure

Toggle uses one config object that includes all configuration parameters needed to configure it. See Config.

Reset to factory default

The Toggle can be reset to factory default state using ConfigRequest with RESET type. Send it as payload to NatsConfigSub subject.

This will reset config and all other modifications on stacktoggle to factory default state. On success, Toggle will reboot immediately.

Index

Enumerations

Type Aliases

Variables

Functions

Generated using TypeDoc