Dunwich Configuration

This section describes all configuration options for the Dunwich module. Most options can be set via environment variables, YAML keys, and some have default values noted below.


Debug

Option Env Variable Default Description
Debug DEBUG "0" Enables debug mode

Service

Option Env Variable YAML Key Default Description
Noop API_NOOP     No-operation switch for testing
Addr BIND_ADDR bind   HTTP bind address
Grpc   grpc   GRPC address
Metrics METRICS_BIND metrics_bind :2112 Metrics HTTP bind address
AuthToken AUTH_TOKEN     Token for API authentication
GraceDuration GRACE_DURATION   1s Grace duration before shutdown
BufferSize BUFFER_SIZE   1024 Internal buffer size
EncKey ENC_KEY     Encryption key for secure operations

NATS

Option Env Variable YAML Key Description
Url NATS_URL url NATS connection URL
Stream   stream NATS stream name
Username NATS_USER   NATS authentication username
Password NATS_PASSWORD   NATS authentication password

Sink

Option Env Variable YAML Key Description
Type   type Sink output type (e.g., postgres)
Host   host Sink host
Port   port Sink port
Database   database Sink database name
User SINK_USER username Sink user
Password SINK_PASSWORD password Sink password
Extra   extra_args Sink extra connection arguments

Registry

Option Env Variable YAML Key Default Description
Addr REGISTRY_ADDR bind   Registry bind address
AdvAddr   advertise   Registry advertise address
DB   database   Registry database path/name
MetricsLog   metrics_log ./data/metrics Registry metrics log path
NodeId NODE_ID   "node1" Registry node identifier

Example YAML Configuration

service:
  bind: "0.0.0.0:3105"
  metrics_bind: ":2112"
  auth_token: "your_token"
  enc_key: "your_key"

nats:
  url: "nats://localhost:4222"
  stream: "example_stream"

sink:
  type: "postgres"
  host: "localhost"
  port: "5432"
  database: "example_wh"

registry:
  bind: ":4567"
  advertise: "10.0.0.5:4567"
  database: "./data/registry.db"