pub struct CoreServerlessRuntime { /* private fields */ }Implementations§
Source§impl CoreServerlessRuntime
impl CoreServerlessRuntime
Sourcepub async fn shutdown(&self)
pub async fn shutdown(&self)
Tear down the cached envoy handle. Idempotent.
Sets shutting_down so concurrent ensure_envoy callers short-circuit
instead of starting a fresh envoy after teardown, and waits (with a
bounded timeout) for envoy_loop to exit. If the drain exceeds the
timeout (e.g. engine unreachable), falls back to an immediate Stop.
Sourcepub async fn wait_actors_drained(&self, timeout_dur: Duration)
pub async fn wait_actors_drained(&self, timeout_dur: Duration)
Wait (bounded) for active actors to reach zero, so an in-flight actor’s Stopped
reaches the engine before shutdown announces the envoy is going away. Otherwise
that announcement becomes a GoingAway that overrides the destroy and reallocates.
pub async fn active_envoy_actor_count(&self) -> Option<usize>
pub async fn active_envoy_status(&self) -> Option<CoreEnvoyStatus>
pub async fn active_envoy_actor_stop_threshold_ms(&self) -> Option<i64>
Sourcepub fn max_request_body_bytes(&self) -> usize
pub fn max_request_body_bytes(&self) -> usize
Listener-side body cap; reuses the /start payload limit.
Sourcepub fn handles_listener_request(&self, url: &str) -> bool
pub fn handles_listener_request(&self, url: &str) -> bool
Returns whether the native listener should reserve this URL for RivetKit’s framework routes instead of forwarding it to an application fallback.
Sourcepub fn incoming_too_long_response(&self) -> ServerlessResponse
pub fn incoming_too_long_response(&self) -> ServerlessResponse
Canonical 413 response built through the RivetError system.
Sourcepub fn invalid_request_response(
&self,
reason: impl Into<String>,
) -> ServerlessResponse
pub fn invalid_request_response( &self, reason: impl Into<String>, ) -> ServerlessResponse
Canonical 400 response for malformed requests.
pub async fn handle_request(&self, req: ServerlessRequest) -> ServerlessResponse
Trait Implementations§
Source§impl Clone for CoreServerlessRuntime
impl Clone for CoreServerlessRuntime
Source§fn clone(&self) -> CoreServerlessRuntime
fn clone(&self) -> CoreServerlessRuntime
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more