pub struct RedDBServer { /* private fields */ }Implementations§
Source§impl RedDBServer
impl RedDBServer
pub fn new(runtime: RedDBRuntime) -> Self
pub fn from_database_options( db_options: RedDBOptions, server_options: ServerOptions, ) -> RedDBResult<Self>
pub fn with_options(runtime: RedDBRuntime, options: ServerOptions) -> Self
Sourcepub fn with_http_limits(self, limits: HttpLimitsResolved) -> Self
pub fn with_http_limits(self, limits: HttpLimitsResolved) -> Self
Stamp resolved HTTP limits onto the server (issue #574 slice 5).
Replaces the limiter cap, the per-handler deadline, and the
Retry-After value used by the limiter’s reject path. All
values are assumed validated by http_limits::resolve_http_limits.
Sourcepub fn with_auth(self, auth_store: Arc<AuthStore>) -> Self
pub fn with_auth(self, auth_store: Arc<AuthStore>) -> Self
Attach an AuthStore for HTTP-layer authentication.
Also injects the store into the runtime so that Value::Secret
auto-encrypt/decrypt can reach the vault AES key.
Sourcepub fn with_replication(self, state: Arc<ServerReplicationState>) -> Self
pub fn with_replication(self, state: Arc<ServerReplicationState>) -> Self
Attach replication state for status and snapshot endpoints.
Sourcepub fn with_websocket_allowed_origins(self, origins: Vec<String>) -> Self
pub fn with_websocket_allowed_origins(self, origins: Vec<String>) -> Self
Set the Origin allowlist that enables the RedWire-over-WSS
browser endpoint (issue #935, ADR 0036). A non-empty list mounts
the /redwire upgrade route on the TLS edge; an empty list leaves
it unmounted (default-deny).
pub fn runtime(&self) -> &RedDBRuntime
pub fn options(&self) -> &ServerOptions
pub fn serve(&self) -> Result<()>
Sourcepub fn serve_on(&self, listener: TcpListener) -> Result<()>
pub fn serve_on(&self, listener: TcpListener) -> Result<()>
Serve the async axum/hyper HTTP edge (issue #931) on the given
listener until it errors fatally. A dedicated multi-threaded tokio
runtime drives the I/O; the synchronous disk-backed engine is
reached via spawn_blocking. This replaces the retired
thread-per-connection accept loop and its (2*num_cpus) thread
cap — idle keep-alive connections are now cheap parked tasks.
Sourcepub fn serve_one_on(&self, listener: TcpListener) -> Result<()>
pub fn serve_one_on(&self, listener: TcpListener) -> Result<()>
Accept and serve a single connection to completion, then return. Used by tests that want a one-shot HTTP server alongside another transport.
pub fn serve_in_background(&self) -> JoinHandle<Result<()>>
pub fn serve_in_background_on( &self, listener: TcpListener, ) -> JoinHandle<Result<()>>
Sourcepub fn serve_tls(&self, tls_config: Arc<ServerConfig>) -> Result<()>
pub fn serve_tls(&self, tls_config: Arc<ServerConfig>) -> Result<()>
Serve TLS-wrapped HTTPS on the configured bind_addr. The
tls_config is shared across all connections (rustls
ServerConfig is Send + Sync).
pub fn serve_tls_on( &self, listener: TcpListener, tls_config: Arc<ServerConfig>, ) -> Result<()>
pub fn serve_tls_in_background( &self, tls_config: Arc<ServerConfig>, ) -> JoinHandle<Result<()>>
pub fn serve_tls_in_background_on( &self, listener: TcpListener, tls_config: Arc<ServerConfig>, ) -> JoinHandle<Result<()>>
Trait Implementations§
Source§impl Clone for RedDBServer
impl Clone for RedDBServer
Source§fn clone(&self) -> RedDBServer
fn clone(&self) -> RedDBServer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for RedDBServer
impl !UnwindSafe for RedDBServer
impl Freeze for RedDBServer
impl Send for RedDBServer
impl Sync for RedDBServer
impl Unpin for RedDBServer
impl UnsafeUnpin for RedDBServer
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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> 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>
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>
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>
T in a tonic::Request