IMPLEMENTATION DOCS / UNS FRAMEWORK

Configuration Guide

How runtime configuration works — Valkey config, environment variables, and multi-instance deployment.

Use this after the core deployment to change connection settings, topics, and runtime options.
On this page 4 sections
Two LayersEnvironment VariablesValkey Config PatternWhich Functions Use Valkey Config?

Two Layers

LayerStored inContainsChanges require
Connection.env fileDB URLs, cache URLs, brokerContainer restart
BusinessValkey cacheTopics, table namesNothing (hot reload)

Environment Variables

VariableDescription
FUNCTION_TARGETFunction name = Valkey config key
DATABASE_URLPostgreSQL connection
CACHE_URLValkey connection
MQTT_BROKERMQTT broker URL

Valkey Config Pattern

docker exec fnkit-cache valkey-cli SET fnkit:config:uns-state \
  '{"table":"uns_state","topics":["v1.0/.../cnc-01/status"]}'

Config cached in-memory for 30 seconds. Change topics without redeploying.

Which Functions Use Valkey Config?

FunctionConfig Key
uns-logfnkit:config:uns-log
uns-statefnkit:config:uns-state
uns-productivityfnkit:config:uns-productivity

Others don't need Valkey config: uns-sim (config.yaml), uns-framework (env), uns-cache, uns-stoppage, uns-input, uns-kpi.