pub struct ServerRuntimeConfig {
pub host: String,
pub port: u16,
pub request_timeout_ms: u64,
pub keep_alive_secs: u64,
pub cors: CorsRuntimeConfig,
pub tls: TlsRuntimeConfig,
}Expand description
HTTP server runtime configuration.
The [server] section in fraiseql.toml is optional. When absent,
the server listens on 0.0.0.0:8080 with no TLS and permissive CORS
(suitable for local development).
CLI flags (--port, --bind) take precedence over these settings.
§Example
[server]
host = "127.0.0.1"
port = 9000
request_timeout_ms = 30_000
keep_alive_secs = 75
[server.cors]
origins = ["https://app.example.com"]
credentials = true
[server.tls]
enabled = true
cert_file = "/etc/fraiseql/cert.pem"
key_file = "/etc/fraiseql/key.pem"Fields§
§host: StringBind host. Default: "0.0.0.0".
port: u16TCP port. Default: 8080.
request_timeout_ms: u64Request timeout in milliseconds. Default: 30 000 (30 s).
keep_alive_secs: u64TCP keep-alive in seconds. Default: 75.
cors: CorsRuntimeConfigCORS settings.
tls: TlsRuntimeConfigTLS settings.
Implementations§
Trait Implementations§
Source§impl Clone for ServerRuntimeConfig
impl Clone for ServerRuntimeConfig
Source§fn clone(&self) -> ServerRuntimeConfig
fn clone(&self) -> ServerRuntimeConfig
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 ServerRuntimeConfig
impl Debug for ServerRuntimeConfig
Source§impl Default for ServerRuntimeConfig
impl Default for ServerRuntimeConfig
Source§impl<'de> Deserialize<'de> for ServerRuntimeConfigwhere
ServerRuntimeConfig: Default,
impl<'de> Deserialize<'de> for ServerRuntimeConfigwhere
ServerRuntimeConfig: 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 ServerRuntimeConfig
impl RefUnwindSafe for ServerRuntimeConfig
impl Send for ServerRuntimeConfig
impl Sync for ServerRuntimeConfig
impl Unpin for ServerRuntimeConfig
impl UnsafeUnpin for ServerRuntimeConfig
impl UnwindSafe for ServerRuntimeConfig
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> 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::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().