mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
Move database config to separate section
This renames: database_backend -> database.backend database_path -> database.path db_cache_capacity_mb -> database.cache_capacity_mb rocksdb_max_open_files -> database.rocksdb_max_open_files Charles updated the NixOS module. Co-authored-by: Charles Hall <charles@computer.surgery>
This commit is contained in:
parent
79d5d306cc
commit
d26b87a2f2
6 changed files with 39 additions and 28 deletions
|
|
@ -31,15 +31,10 @@ pub(crate) struct Config {
|
|||
pub(crate) tls: Option<TlsConfig>,
|
||||
|
||||
pub(crate) server_name: OwnedServerName,
|
||||
pub(crate) database_backend: String,
|
||||
pub(crate) database_path: String,
|
||||
#[serde(default = "default_db_cache_capacity_mb")]
|
||||
pub(crate) db_cache_capacity_mb: f64,
|
||||
pub(crate) database: DatabaseConfig,
|
||||
|
||||
#[serde(default = "default_cache_capacity_modifier")]
|
||||
pub(crate) cache_capacity_modifier: f64,
|
||||
#[cfg(feature = "rocksdb")]
|
||||
#[serde(default = "default_rocksdb_max_open_files")]
|
||||
pub(crate) rocksdb_max_open_files: i32,
|
||||
#[serde(default = "default_pdu_cache_capacity")]
|
||||
pub(crate) pdu_cache_capacity: u32,
|
||||
#[serde(default = "default_cleanup_second_interval")]
|
||||
|
|
@ -158,6 +153,17 @@ impl Default for TurnConfig {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize)]
|
||||
pub(crate) struct DatabaseConfig {
|
||||
pub(crate) backend: String,
|
||||
pub(crate) path: String,
|
||||
#[serde(default = "default_db_cache_capacity_mb")]
|
||||
pub(crate) cache_capacity_mb: f64,
|
||||
#[cfg(feature = "rocksdb")]
|
||||
#[serde(default = "default_rocksdb_max_open_files")]
|
||||
pub(crate) rocksdb_max_open_files: i32,
|
||||
}
|
||||
|
||||
fn false_fn() -> bool {
|
||||
false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue