Skip to main content

Module create_steps

Module create_steps 

Source
Expand description

The steps of handle_pty_shell_create, one function each, in the order the handler runs them: where the shell runs, the SSH consent, the reuse of the pane’s existing shell, the new shell’s block, the atomic claim of the pane’s one shell pointer, the controller start and its rollback. Moved out of the handler without a change in behaviour. A child module of http_pty_shell.rs.

Functions§

add_ssh_and_cwd_meta 🔒
The SSH agent’s identity and the working directory, onto the new shell’s meta.
attach_to_pointed_shell 🔒
The pane’s existing shell, if its pointer still resolves to one that can be handed out.
broadcast_agent_block_update 🔒
Tell subscribed frontends the agent’s block changed (its shell pointer or its sub-blocks).
claim_shell_block 🔒
Insert the new shell block and point the agent’s block at it, unless another call got there first, in which case that call’s shell is attached to instead (Err carries the response to return).
create_pty_shell 🔒
POST /api/v1/ptyshell/create, step by step. Err carries a response that ends the call early: a refusal, or the attachment to the pane’s existing shell.
initial_geometry 🔒
The caller’s initial PTY geometry, if it gave one, as runtime options and as the JSON the resync takes.
insert_after_lost_claim 🔒
The winner’s shell is gone or had exited: create ours for real, as the won-claim path would have.
resolve_connection 🔒
Where the shell runs and its connection name, or the refusal. A refused connection fails the call with its reason rather than opening a local shell.
roll_back_failed_spawn 🔒
A failed spawn leaves nothing behind: the block, its link in the agent’s block and the pointer go.
shell_block_meta 🔒
The new shell block’s meta: the headless term shape, the agent’s env guards, the automatic shell, and the connection.
ssh_gate 🔒
The agent that consents for an SSH shell (empty for any other connection), after the checks that come before anything is asked.
start_shell_controller 🔒
Start the shell’s controller; the PTY is live when this returns.

Type Aliases§

Early 🔒