pub struct Settings {Show 27 fields
pub port: u16,
pub hostname: Option<String>,
pub resolve_hostname: bool,
pub router_port: u16,
pub router_hostname: Option<String>,
pub auto_ping_interval: Duration,
pub auto_ping_timeout: Duration,
pub open_handshake_timeout: Duration,
pub close_handshake_timeout: Duration,
pub endpoint_scheme: String,
pub endpoint_hostname: String,
pub endpoint_port: u16,
pub crypto_key: String,
pub statsd_host: Option<String>,
pub statsd_port: u16,
pub statsd_label: String,
pub db_dsn: Option<String>,
pub db_settings: String,
pub megaphone_api_url: Option<String>,
pub megaphone_api_token: Option<String>,
pub megaphone_poll_interval: Duration,
pub human_logs: bool,
pub msg_limit: u32,
pub actix_max_connections: Option<usize>,
pub actix_workers: Option<usize>,
pub reliability_dsn: Option<String>,
pub reliability_retry_count: usize,
}Expand description
The Applications settings, read from CLI, Environment or settings file, for the autoconnect application. These are later converted to [autoconnect::autoconnect-settings::AppState].
Fields§
§port: u16The application port to listen on
hostname: Option<String>The DNS specified name of the application host to used for internal routing
resolve_hostname: boolThe override hostname to use for internal routing (NOTE: requires hostname to be set)
router_port: u16The internal webpush routing port
router_hostname: Option<String>The DNS name to use for internal routing
auto_ping_interval: DurationThe server based ping interval (also used for Broadcast sends)
auto_ping_timeout: DurationHow long to wait for a response Pong before being timed out and connection drop
open_handshake_timeout: DurationHow long to wait for the initial connection handshake.
close_handshake_timeout: DurationHow long to wait while closing a connection for the response handshake.
endpoint_scheme: StringThe URL scheme (http/https) for the endpoint URL
endpoint_hostname: StringThe host url for the endpoint URL (differs from hostname and resolve_hostname)
endpoint_port: u16The optional port override for the endpoint URL
crypto_key: StringThe seed key to use for endpoint encryption
statsd_host: Option<String>The host name to send recorded metrics
statsd_port: u16The port number to send recorded metrics
statsd_label: StringThe root label to apply to metrics.
db_dsn: Option<String>The DSN to connect to the storage engine (Used to select between storage systems)
db_settings: StringJSON set of specific database settings (See data storage engines)
megaphone_api_url: Option<String>Server endpoint to pull Broadcast ID change values (Sent in Pings)
megaphone_api_token: Option<String>Broadcast token for authentication
megaphone_poll_interval: DurationHow often to poll the server for new data
human_logs: boolUse human readable (simplified, non-JSON)
msg_limit: u32Maximum allowed number of backlogged messages. Exceeding this number will trigger a user reset because the user may have been offline way too long.
actix_max_connections: Option<usize>Sets the maximum number of concurrent connections per actix-web worker.
All socket listeners will stop accepting connections when this limit is reached for each worker.
actix_workers: Option<usize>Sets number of actix-web workers to start (per bind address).
By default, the number of available physical CPUs is used as the worker count.
reliability_dsn: Option<String>The DNS for the reliability data store. This is normally a Redis compatible storage system. See Connection Parameters for details.
reliability_retry_count: usizeMax number of retries for retries for Redis transactions
Implementations§
Source§impl Settings
impl Settings
Sourcepub fn with_env_and_config_files(
filenames: &[String],
) -> Result<Self, ConfigError>
pub fn with_env_and_config_files( filenames: &[String], ) -> Result<Self, ConfigError>
Load the settings from the config files in order first then the environment.