pub struct GatewayConfig {
pub port: u16,
pub grpc_port: u16,
pub max_connections: usize,
pub sse_max_sessions: usize,
pub request_timeout_secs: u64,
pub cors_enabled: bool,
pub cors_origins: Vec<String>,
pub quiet_routes: Vec<String>,
pub max_body_size: String,
pub max_file_size: String,
}Expand description
Gateway configuration.
Fields§
§port: u16HTTP port.
grpc_port: u16gRPC port for inter-node communication (reserved for future use).
This port is registered in the cluster node info but a gRPC listener is not yet started. It will be used for efficient binary inter-node RPC in a future release.
max_connections: usizeMaximum concurrent connections.
sse_max_sessions: usizeMaximum active SSE sessions.
request_timeout_secs: u64Request timeout in seconds.
cors_enabled: boolEnable CORS handling.
cors_origins: Vec<String>Allowed CORS origins.
quiet_routes: Vec<String>Routes excluded from request logs, metrics, and traces.
Defaults to ["/_api/health", "/_api/ready"]. Set to [] to monitor everything.
max_body_size: StringMaximum request body size (e.g. “100mb”, “1gb”). Defaults to “20mb”.
max_file_size: StringDefault per-file cap for multipart uploads (e.g. “10mb”, “200mb”).
Applies when a mutation does not declare its own max_size. Set to
the same value as max_body_size to disable the per-file guard.
Defaults to “10mb”.
Implementations§
Source§impl GatewayConfig
impl GatewayConfig
Sourcepub fn max_body_size_bytes(&self) -> Result<usize>
pub fn max_body_size_bytes(&self) -> Result<usize>
Parse max_body_size into bytes.
Sourcepub fn max_file_size_bytes(&self) -> Result<usize>
pub fn max_file_size_bytes(&self) -> Result<usize>
Parse max_file_size into bytes.
Trait Implementations§
Source§impl Clone for GatewayConfig
impl Clone for GatewayConfig
Source§fn clone(&self) -> GatewayConfig
fn clone(&self) -> GatewayConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GatewayConfig
impl Debug for GatewayConfig
Source§impl Default for GatewayConfig
impl Default for GatewayConfig
Source§impl<'de> Deserialize<'de> for GatewayConfig
impl<'de> Deserialize<'de> for GatewayConfig
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>,
Auto Trait Implementations§
impl Freeze for GatewayConfig
impl RefUnwindSafe for GatewayConfig
impl Send for GatewayConfig
impl Sync for GatewayConfig
impl Unpin for GatewayConfig
impl UnsafeUnpin for GatewayConfig
impl UnwindSafe for GatewayConfig
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
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 more