pub struct ServerConfig {
pub host: String,
pub port: u16,
pub snapshot_path: Option<PathBuf>,
pub restore_from: Option<PathBuf>,
pub wal_dir: Option<PathBuf>,
pub wal_sync_mode: SyncMode,
}Fields§
§host: String§port: u16§snapshot_path: Option<PathBuf>When set, the server mounts the /admin/snapshot/{save,load} routes
and wires them to this path. None means the admin surface is
disabled entirely — the default, so we never expose admin endpoints
on a network-reachable process unless the operator asks for it.
restore_from: Option<PathBuf>When Some, the server restores the graph from this path at boot.
Missing file at boot is treated as an empty graph (same as without
--restore-from). Independent of snapshot_path so operators can
restore from a read-only location and write back somewhere else.
wal_dir: Option<PathBuf>When Some, the server attaches a WAL at this directory and
brackets every query with begin/commit/abort. Also unlocks the
/admin/checkpoint, /admin/wal/status, and
/admin/wal/truncate admin routes (only when snapshot_path
is also configured).
wal_sync_mode: SyncModeDurability cadence for the WAL. Ignored when wal_dir is None.
Implementations§
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more