pub struct InstanceConfig {
pub instance_id: String,
pub role: String,
pub id_range_start: u64,
pub id_range_size: u64,
}Expand description
Multi-instance configuration.
Controls how this server instance participates in a multi-instance deployment. In single-instance mode (default), all settings can be left at defaults.
For multi-instance deployments:
- Each instance needs a unique
instance_id roledetermines whether this instance can write (writer), only read (reader), or auto-detectid_range_startandid_range_sizepartition the node ID space to avoid collisions
Fields§
§instance_id: StringUnique identifier for this server instance. Auto-generated from hostname + PID if not set.
role: StringInstance role: “auto” (default), “writer”, or “reader”.
- “auto”: single-instance mode, acts as both reader and writer
- “writer”: can perform writes (ingestion, learn, update, delete)
- “reader”: read-only (search, augment, get operations only)
id_range_start: u64Starting node ID for this instance’s ID allocation range. Each instance should have a non-overlapping range to avoid ID collisions. Default: 1_000_000 (same as single-instance).
id_range_size: u64Size of this instance’s node ID allocation range. Default: 1_000_000_000 (1 billion IDs per instance).
Implementations§
Source§impl InstanceConfig
impl InstanceConfig
Sourcepub fn resolved_instance_id(&self) -> String
pub fn resolved_instance_id(&self) -> String
Resolve the instance_id. If set to “auto”, generate from hostname + PID.
Sourcepub fn is_reader_only(&self) -> bool
pub fn is_reader_only(&self) -> bool
Whether this instance is a dedicated reader (no writes).
Trait Implementations§
Source§impl Clone for InstanceConfig
impl Clone for InstanceConfig
Source§fn clone(&self) -> InstanceConfig
fn clone(&self) -> InstanceConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more