Documentation
¶
Overview ¶
internal/session/session.go Session wires a PTY process to the emulator, the event log, and viewer fan-out. The session never depends on any viewer connection.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct {
ID int
Msgs <-chan terminal.ServerMessage
}
type Proc ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) Attach ¶
func (s *Session) Attach(since uint64, size Size) (*Attachment, error)
Attach adds a viewer and decides what it opens with, from its cursor:
- 0 — "I hold no cursor": a snapshot of the current screen, then live output. Every plain attach, and the only shape a fresh viewer should ever cost the log (spec §5: never repaint a screen by replaying raw bytes).
- terminal.SinceAll — "the whole log": every entry from the first, then live. What `rainier attach --since 0` asks for, and the only way to read output that has already scrolled off the screen — a failed setup's full log, an overnight session's history.
- anything else — a resume cursor: the entries after it, then live.
The last two both fall back to the snapshot when the log cannot answer them (an empty log, or a cursor already past its end): a viewer must never open on silence with no screen and no size.
Click to show internal directories.
Click to hide internal directories.