Skip to main content

Module config

Module config 

Source
Expand description

Server configuration file support with hot-reload.

§Example Configuration (TOML)

listen = "0.0.0.0:8080"
default_target = "127.0.0.1:22"

[routes]
"/ssh" = "127.0.0.1:22"
"/db" = "127.0.0.1:5432"

[tls]
cert = "cert.pem"
key = "key.pem"
# Or use: self_signed = true

Structs§

ConfigWatcher
Watch a configuration file for changes
ResolvedConfig
Resolved server configuration with listen address and routes. Route targets are stored as strings and resolved at connection time.
ServerFileConfig
Server configuration loaded from a TOML file
TlsFileConfig
TLS configuration in config file

Enums§

ConfigChange
Configuration change notification

Functions§

create_shared_config
Create a shared routing config from file config

Type Aliases§

SharedRoutingConfig
Shared routing configuration that can be hot-reloaded