Module console

Module console 

Source
Expand description

Console-attach service wrappers.

crate::server::common::app_context::InfraContext borrows the backend and cannot outlive the handler frame. WebSocket upgrade closures need owned (move-captured) state that is 'static-compatible, so these wrappers accept a cloned crate::dispatcher::StaticBackendDispatcher instead of &InfraContext.

Handlers call crate::server::common::app_context::InfraContext::backend_clone before the borrowed infra is dropped and move the result into the WebSocket closure. The closure then delegates here rather than traversing state.sites.get(&site_name).backend directly.

All authorization and vault/k8s URL checks must be performed in the handler BEFORE the backend is cloned and the closure is spawned.

Functionsยง

attach_to_node_console
Attach an interactive PTY console to a node.
attach_to_session_console
Attach an interactive PTY console to a running CFS session pod.