pub struct GatewayConfig {
pub bind_address: SocketAddr,
pub domain_suffix: String,
pub heartbeat_interval: Duration,
pub heartbeat_timeout: Duration,
/* private fields */
}Expand description
Configuration options for the AppCore Gateway service.
The domain_suffix field must be set explicitly by the deployment.
AppCore is a generic Runtime and does not assume any specific domain.
Fields§
§bind_address: SocketAddrServer IP and port to bind to.
domain_suffix: StringDomain suffix used to resolve tenant IDs from incoming Host headers.
The deployer sets this to the domain that owns the gateway
(e.g., gateway.example.com). An incoming request to
tenant-a.gateway.example.com resolves to TenantId("tenant-a").
This value is deployment-specific and has no default.
heartbeat_interval: DurationInterval at which the gateway expects worker heartbeats.
heartbeat_timeout: DurationMaximum time window allowed without any heartbeat before pruning a connection.
Implementations§
Source§impl GatewayConfig
impl GatewayConfig
Sourcepub fn new(bind_address: SocketAddr, domain_suffix: impl Into<String>) -> Self
pub fn new(bind_address: SocketAddr, domain_suffix: impl Into<String>) -> Self
Creates a configuration with all required fields.
Sourcepub fn requires_authentication(&self) -> bool
pub fn requires_authentication(&self) -> bool
Reports whether connection and mesh-relay authentication is required.
Sourcepub fn from_provider_config(provider: &ProviderConfig) -> GatewayResult<Self>
pub fn from_provider_config(provider: &ProviderConfig) -> GatewayResult<Self>
Parses the bounded, non-secret Gateway settings selected by a deployment adapter.
Supported settings are bind_address, domain_suffix,
heartbeat_interval_ms, and heartbeat_timeout_ms. Authentication is
intentionally not configurable through a deployment setting and
remains enabled.
Sourcepub fn insecure_local_for_testing(self) -> Result<Self, GatewayError>
pub fn insecure_local_for_testing(self) -> Result<Self, GatewayError>
Explicitly disables authentication for a loopback-only local test.
Sourcepub fn validate(&self) -> Result<(), GatewayError>
pub fn validate(&self) -> Result<(), GatewayError>
Validates the configuration bounds.
Trait Implementations§
Source§impl Clone for GatewayConfig
impl Clone for GatewayConfig
Source§fn clone(&self) -> GatewayConfig
fn clone(&self) -> GatewayConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more