From a44e3276dd0f5478741726003f434608ea880231 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Quiros Date: Mon, 13 Feb 2023 15:07:56 +0100 Subject: [PATCH] Added store configuration --- waku-bindings/src/node/config.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/waku-bindings/src/node/config.rs b/waku-bindings/src/node/config.rs index 71d68ee..bd9026b 100644 --- a/waku-bindings/src/node/config.rs +++ b/waku-bindings/src/node/config.rs @@ -34,7 +34,18 @@ pub struct WakuNodeConfig { /// Enable relay protocol. Default `true` #[default(Some(true))] pub relay: Option, - #[serde(default)] + /// Enable store protocol to persist message history + #[default(Some(false))] + pub store: Option, + /// Url connection string. Accepts SQLite and PostgreSQL connection strings + #[default(Some("sqlite3://store.db".to_string()))] + pub database_url: Option, + /// Max number of messages to store in the databas + #[default(Some(1000))] + pub store_retention_max_messages: Option, + /// Max number of seconds that a message will be persisted in the database, default 1 day + #[default(Some(86400))] + pub store_retention_max_seconds: Option, pub relay_topics: Vec, /// The minimum number of peers required on a topic to allow broadcasting a message. Default `0` #[default(Some(0))]