pub struct ServerConfig {Show 17 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_request_size: usize,
pub max_response_size: usize,
pub max_connections: usize,
pub session_ttl: Duration,
pub metrics_enabled: bool,
pub tracing_enabled: bool,
pub audit_log_enabled: bool,
pub audit_log_output: AuditLogOutput,
}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_request_size: usizeMax request size in bytes.
max_response_size: usizeMax response size in bytes.
max_connections: usizeMax concurrent connections.
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.
Implementations§
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 · 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 Freeze for ServerConfig
impl !RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl !UnwindSafe 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,
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> 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