Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v0.0.20
type Client struct {
SessionID string `json:"session_id"`
// contains filtered or unexported fields
}
type Screen ¶
type Screen struct {
Columns int `json:"columns"`
Rows int `json:"rows"`
Clients []*Client `json:"-"`
Stream *stream.Stream `json:"-"`
// contains filtered or unexported fields
}
Screen broadcasts a single terminal to every attached client. It keeps an authoritative in-memory terminal emulator so new clients can be brought to the current state.
mx guards Clients, Rows, and Columns. The emulator (mt) and the broadcast Stream are internally synchronized, so they are used without holding mx. The lock is never held while sending to a client.
func (*Screen) AttachClient ¶ added in v0.0.20
AttachClient attaches a client and brings it to the current screen state.
func (*Screen) GetScreenAsANSI ¶
GetScreenAsANSI returns the current screen content as ANSI.
Click to show internal directories.
Click to hide internal directories.