Skip to main content

Module check

Module check 

Source
Expand description

Validates configuration before startup and reload.

Checks reject invalid combinations while emitting warnings for deprecated or risky values. Reload validation also prevents runtime changes to fixed identity and network fields.

Re-exportsยง

use std::env::consts::OS; ๐Ÿ”’
use std::fs::read_to_string; ๐Ÿ”’
use std::net::IpAddr; ๐Ÿ”’
use std::net::SocketAddr; ๐Ÿ”’
use std::time::Duration; ๐Ÿ”’
use argon2::Error as Argon2Error; ๐Ÿ”’
use either::Either; ๐Ÿ”’
use http::HeaderValue; ๐Ÿ”’
use itertools::Itertools; ๐Ÿ”’
use regex::RegexSet; ๐Ÿ”’
use url::Url; ๐Ÿ”’
use super::DEPRECATED_KEYS; ๐Ÿ”’
use super::IdentityProvider; ๐Ÿ”’
use super::KNOWN_KEYS; ๐Ÿ”’
use super::turn::Provider; ๐Ÿ”’
use super::turn::Turn; ๐Ÿ”’
use crate::Config; ๐Ÿ”’
use crate::Err; ๐Ÿ”’
use crate::Result; ๐Ÿ”’
use crate::debug; ๐Ÿ”’
use crate::debug; ๐Ÿ”’
use crate::debug_info; ๐Ÿ”’
use crate::err; ๐Ÿ”’
use crate::error; ๐Ÿ”’
use crate::error; ๐Ÿ”’
use crate::utils::is_secret_set; ๐Ÿ”’
use crate::utils::string::equals_any; ๐Ÿ”’
use crate::utils::string::is_opaque_id; ๐Ÿ”’
use crate::utils::sys::storage::Filesystem; ๐Ÿ”’
use crate::utils::sys::storage::filesystem_from_path; ๐Ÿ”’
use crate::utils::time::timepoint_from_now; ๐Ÿ”’
use crate::warn; ๐Ÿ”’

Constantsยง

MAX_THUMBNAIL_CONCURRENCY ๐Ÿ”’
Slots either thumbnail concurrency knob may ask for.

Functionsยง

check
Validates a complete server configuration.
check_email ๐Ÿ”’
check_identity_provider_secret ๐Ÿ”’
check_identity_providers ๐Ÿ”’
check_jwt ๐Ÿ”’
check_media_providers ๐Ÿ”’
check_network ๐Ÿ”’
check_observability ๐Ÿ”’
check_password_hashing ๐Ÿ”’
check_profile_requests ๐Ÿ”’
check_registration ๐Ÿ”’
check_registration_terms ๐Ÿ”’
check_relation_limits ๐Ÿ”’
check_room_version ๐Ÿ”’
check_space_hierarchy_cache ๐Ÿ”’
check_storage ๐Ÿ”’
check_thumbnails ๐Ÿ”’
check_turn ๐Ÿ”’
check_turn_and_media_misc ๐Ÿ”’
check_typing_timeouts ๐Ÿ”’
check_url_previews ๐Ÿ”’
check_video_thumbnails ๐Ÿ”’
check_well_known_support_contact_validity ๐Ÿ”’
database_filesystem ๐Ÿ”’
Identify the filesystem that will host the database.
has_upload_provider ๐Ÿ”’
Reports whether any provider the storage service builds receives uploads.
is_literal_dotted ๐Ÿ”’
Whether a pattern is a plain dotted name rather than an expression.
reload
Performs check() with additional checks specific to reloading old config with new config.
unusable_concurrency ๐Ÿ”’
Whether a concurrency knob names a number of slots that cannot serve.
valid_openpgp4fpr ๐Ÿ”’
validate_pgp_key ๐Ÿ”’
Validates an MSC4439 pgp_key: a URI, never inline key material.
warn_deprecated ๐Ÿ”’
Iterates over all the keys in the config file and warns if there is a deprecated key specified
warn_domain_contains_entries ๐Ÿ”’
Warns about domain_contains_allowlist entries that can never match.
warn_legacy_state_local ๐Ÿ”’
warn_literal_pattern ๐Ÿ”’
warn_literal_patterns ๐Ÿ”’
Warns where a pattern option holds text that reads as a plain name.
warn_loopback_in_container ๐Ÿ”’
warn_native_auth_without_sign_in ๐Ÿ”’
warn_oidc_client_approval ๐Ÿ”’
warn_oidc_registration_token ๐Ÿ”’
warn_unforwarded_local_listeners ๐Ÿ”’
warn_unknown_key ๐Ÿ”’
iterates over all the catchall keys (unknown config options) and warns or errors if there are any.