Replace lexical Rust fragments with real modules
This commit is contained in:
parent
f8849cdb5f
commit
247819250b
1 changed files with 3302 additions and 2671 deletions
|
|
@ -1,18 +1,29 @@
|
|||
struct ActiveTerminal {
|
||||
generation_id: GenerationId,
|
||||
request: TerminalAcquisition,
|
||||
route: TerminalRoute,
|
||||
record: SessionTerminal,
|
||||
process: Box<dyn SessionTerminalProcess>,
|
||||
releasing: bool,
|
||||
pending_input: VecDeque<u8>,
|
||||
use super::{
|
||||
Arc, ContainerId, ControlError, CoordinatorId, DomainId, GenerationId, HashMap,
|
||||
HostCoordinatorDomainStore, HostCoordinatorTerminalRecorder, InteractiveControlSession,
|
||||
InteractiveSessionBatch, InteractiveSessionEvent, InteractiveSessionExecutor,
|
||||
InteractiveSessionMessage, InteractiveSessionRequest, Mutex, OsString, PathBuf,
|
||||
PidfsProcessIdentityV1, PromptRouteCancellation, ProtocolVersion, RunscSessionTerminalFactory,
|
||||
SessionId, SessionPromptTransport, SessionTerminal, SessionTerminalEvent,
|
||||
SessionTerminalFactory, SessionTerminalMessage, SessionTerminalProcess, TerminalAcquisition,
|
||||
TerminalError, TerminalLoss, TerminalRoute, VecDeque,
|
||||
};
|
||||
|
||||
pub(super) struct ActiveTerminal {
|
||||
pub(super) generation_id: GenerationId,
|
||||
pub(super) request: TerminalAcquisition,
|
||||
pub(super) route: TerminalRoute,
|
||||
pub(super) record: SessionTerminal,
|
||||
pub(super) process: Box<dyn SessionTerminalProcess>,
|
||||
pub(super) releasing: bool,
|
||||
pub(super) pending_input: VecDeque<u8>,
|
||||
}
|
||||
|
||||
pub struct SessionTerminalEngine {
|
||||
recorder: HostCoordinatorTerminalRecorder,
|
||||
factory: Arc<dyn SessionTerminalFactory>,
|
||||
cancellation: Arc<dyn PromptRouteCancellation>,
|
||||
active: HashMap<SessionId, ActiveTerminal>,
|
||||
pub(super) recorder: HostCoordinatorTerminalRecorder,
|
||||
pub(super) factory: Arc<dyn SessionTerminalFactory>,
|
||||
pub(super) cancellation: Arc<dyn PromptRouteCancellation>,
|
||||
pub(super) active: HashMap<SessionId, ActiveTerminal>,
|
||||
}
|
||||
|
||||
pub struct RunscInteractiveSessionExecutor {
|
||||
|
|
@ -124,11 +135,11 @@ impl InteractiveSessionExecutor for RunscInteractiveSessionExecutor {
|
|||
}
|
||||
}
|
||||
|
||||
struct RunscInteractiveControlSession {
|
||||
engine: Arc<Mutex<SessionTerminalEngine>>,
|
||||
prompt_transport: Arc<SessionPromptTransport>,
|
||||
generation_id: GenerationId,
|
||||
session_id: SessionId,
|
||||
pub(super) struct RunscInteractiveControlSession {
|
||||
pub(super) engine: Arc<Mutex<SessionTerminalEngine>>,
|
||||
pub(super) prompt_transport: Arc<SessionPromptTransport>,
|
||||
pub(super) generation_id: GenerationId,
|
||||
pub(super) session_id: SessionId,
|
||||
}
|
||||
|
||||
impl InteractiveControlSession for RunscInteractiveControlSession {
|
||||
|
|
@ -246,4 +257,3 @@ fn hex_session(bytes: &[u8]) -> String {
|
|||
output
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue