aboutsummaryrefslogtreecommitdiff
path: root/src/util/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/config.rs')
-rw-r--r--src/util/config.rs16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/util/config.rs b/src/util/config.rs
index e4d96476..4d66bfe4 100644
--- a/src/util/config.rs
+++ b/src/util/config.rs
@@ -73,7 +73,11 @@ pub struct Config {
pub sled_flush_every_ms: u64,
/// Configuration for S3 api
- pub s3_api: ApiConfig,
+ pub s3_api: S3ApiConfig,
+
+ /// Configuration for K2V api
+ #[cfg(feature = "k2v")]
+ pub k2v_api: Option<K2VApiConfig>,
/// Configuration for serving files as normal web server
pub s3_web: WebConfig,
@@ -85,7 +89,7 @@ pub struct Config {
/// Configuration for S3 api
#[derive(Deserialize, Debug, Clone)]
-pub struct ApiConfig {
+pub struct S3ApiConfig {
/// Address and port to bind for api serving
pub api_bind_addr: SocketAddr,
/// S3 region to use
@@ -95,6 +99,14 @@ pub struct ApiConfig {
pub root_domain: Option<String>,
}
+/// Configuration for K2V api
+#[cfg(feature = "k2v")]
+#[derive(Deserialize, Debug, Clone)]
+pub struct K2VApiConfig {
+ /// Address and port to bind for api serving
+ pub api_bind_addr: SocketAddr,
+}
+
/// Configuration for serving files as normal web server
#[derive(Deserialize, Debug, Clone)]
pub struct WebConfig {