pub struct ServerConfig {Show 19 fields
pub http_bind: SocketAddr,
pub grpc_bind: SocketAddr,
pub admin_bind: SocketAddr,
pub admin_allowlist: Vec<IpAddr>,
pub data_dir: PathBuf,
pub api_prefix: String,
pub auth_mode: AuthMode,
pub tls: Option<TlsConfig>,
pub query_timeout: Duration,
pub max_concurrency: usize,
pub max_queue_len: usize,
pub max_request_size: usize,
pub max_response_size: usize,
pub session_ttl: Duration,
pub metrics_enabled: bool,
pub tracing_enabled: bool,
pub audit_log_enabled: bool,
pub audit_log_output: AuditLogOutput,
pub cluster: ClusterServerConfig,
}Expand description
Server configuration options.
Fields§
§http_bind: SocketAddrHTTP bind address.
grpc_bind: SocketAddrgRPC bind address.
admin_bind: SocketAddrAdmin bind address.
admin_allowlist: Vec<IpAddr>Allowlist for admin API when non-loopback.
data_dir: PathBufData directory for storage.
api_prefix: StringAPI prefix for HTTP routes.
auth_mode: AuthModeAuthentication mode.
tls: Option<TlsConfig>TLS configuration (optional).
query_timeout: DurationQuery timeout.
max_concurrency: usizeMaximum number of concurrent requests admitted.
max_queue_len: usizeMaximum number of queued requests under backpressure.
max_request_size: usizeMax request size in bytes.
max_response_size: usizeMax response size in bytes.
session_ttl: DurationSession TTL.
metrics_enabled: boolEnable Prometheus metrics.
tracing_enabled: boolEnable tracing.
audit_log_enabled: boolEnable audit logging.
audit_log_output: AuditLogOutputAudit log output.
cluster: ClusterServerConfigCluster-aware startup configuration.
Implementations§
Source§impl ServerConfig
impl ServerConfig
Sourcepub fn load(path: Option<&Path>) -> Result<Self>
pub fn load(path: Option<&Path>) -> Result<Self>
Load config from TOML and environment variables.
Environment variables use ALOPEX__ prefix with __ separators.
Sourcepub fn cluster_manager_config(&self) -> Result<ClusterManagerConfig>
pub fn cluster_manager_config(&self) -> Result<ClusterManagerConfig>
Build cluster manager configuration from server configuration.
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServerConfig
impl Debug for ServerConfig
Source§impl Default for ServerConfig
impl Default for ServerConfig
Source§impl<'de> Deserialize<'de> for ServerConfigwhere
ServerConfig: Default,
impl<'de> Deserialize<'de> for ServerConfigwhere
ServerConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ServerConfig
impl !UnwindSafe for ServerConfig
impl Freeze for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request