pub struct FdbConfig { /* private fields */ }Expand description
Validated FoundationDB connector configuration.
The cluster-file path is deliberately redacted from Debug output. Cluster
files are not credentials, but their paths commonly disclose deployment
topology and should not become routine log metadata.
Implementations§
Source§impl FdbConfig
impl FdbConfig
Sourcepub fn new(input: FdbConfigInput) -> FdbResult<Self>
pub fn new(input: FdbConfigInput) -> FdbResult<Self>
Constructs validated connector configuration.
Sourcepub fn from_env() -> FdbResult<Self>
pub fn from_env() -> FdbResult<Self>
Builds configuration from the conventional process environment.
Reads FDB_CLUSTER_FILE, FDB_API_VERSION, and
FDB_HEALTH_CHECK_TIMEOUT_MILLIS.
Sourcepub fn from_env_prefix(prefix: &str) -> FdbResult<Self>
pub fn from_env_prefix(prefix: &str) -> FdbResult<Self>
Builds configuration from service-prefixed environment variables.
For prefix = "HANDLE", this reads HANDLE_FDB_CLUSTER_FILE,
HANDLE_FDB_API_VERSION, and
HANDLE_FDB_HEALTH_CHECK_TIMEOUT_MILLIS. FoundationDB supports one
client network per process, so one prefix must be selected per process.
Sourcepub fn fdb_cluster_file(&self) -> Option<&str>
pub fn fdb_cluster_file(&self) -> Option<&str>
Returns the optional validated cluster-file path.
Sourcepub const fn fdb_api_version(&self) -> i32
pub const fn fdb_api_version(&self) -> i32
Returns the configured FoundationDB runtime API version.
Sourcepub const fn health_check_timeout(&self) -> Duration
pub const fn health_check_timeout(&self) -> Duration
Returns the deadline applied to a complete connector health probe.