Define all cluster drivers in the driver module

This commit is contained in:
2026-11-30 17:59:32 +08:00
parent 353ea1558c
commit 3c551ca0a3
5 changed files with 20 additions and 18 deletions
+13 -2
View File
@@ -1,6 +1,6 @@
use serde::{Deserialize, Serialize};
//! Driver definitions shared by the backend configuration modules.
use crate::SqlDriver;
use serde::{Deserialize, Serialize};
/// Common backend type for catalog lookups in Rust.
///
@@ -18,6 +18,17 @@ pub enum Driver {
OnlineService(OnlineServiceKind),
}
/// The driver in SQL cluster configuration. Serde uses snake_case names such as `postgres`.
/// `SqlDriver::default()` selects `Sqlite`.
#[derive(Clone, Copy, Debug, Default, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum SqlDriver {
#[default]
Sqlite,
Postgres,
Mysql,
}
/// The driver in object storage configuration. Serde reads and writes `S3` as `s3`.
#[derive(Clone, Copy, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]