Operating Husaria
Runtime settings
Runtime settings #
Persisted in husaria_data.runtime_settings and rendered live by the console. Writes serialise through Store.Set; readers are lock-free via an atomic snapshot pointer. The catalog is hard-coded.
Settings catalog #
| Key | Kind | Live or restart | Description |
|---|---|---|---|
log_level | string | live (zap atom) | Process-wide log verbosity. |
introspection_enabled | bool | live | Allow __schema / __type on /v1/graphql. |
maintenance_mode | bool | live | Non-admin callers get 503 on /v1/graphql. Admin secret bypasses. |
unauthorized_role | string | live | Role applied to unauthenticated requests in legacy session-vars flows. |
default_query_limit | int | live | Console SQL Runner default LIMIT. Hard cap stays 5000. |
cors_origins | string | restart | Comma-separated CORS allow-list. |
db_max_connections | int | restart | Postgres pool size. |
enable_console | bool | restart | Mount the /console UI. |
enable_websocket | bool | restart | Toggle GraphQL subscriptions over WebSocket. |
jwt_claims_namespace | string | restart | JWT namespace claim path. |
Endpoints #
PUT /console/api/settingsupserts a single key.DELETE /console/api/settings/:keyreverts to the env default; live-applied keys fire their observer withnil.
Behaviour #
"Live" settings take effect immediately — log level changes propagate to the zap atomic level, the GraphQL handler reads the introspection flag per-request, and the maintenance gate is checked on each call. "Restart" settings are persisted but only consumed at startup; the console flags them so operators know a redeploy is required.