Module session

Module session 

Source
Expand description

Persistent terminal sessions with scrollback and lifecycle management.

A Session wraps a Terminal and adds:

  • a configurable ring-buffer of recent output (scrollback, default 256 KiB),
  • client attach/detach tracking,
  • orphan detection (no clients for 60 s → auto-remove).

SessionStore is the global session registry. Each session gets a reaper task that periodically checks for removal conditions.

Structs§

Session
A persistent terminal session.
SessionStore
Thread-safe session registry keyed by UUID.

Enums§

ScrollbackEvent
A scrollback event — either terminal output or a window-size change.

Constants§

ORPHAN_TIMEOUT 🔒
Time without any attached clients before a session is reaped.

Type Aliases§

AttachResult
Return type of Session::attach: scrollback events, output stream, and window-size watch.