MCPcopy Index your code
hub / github.com/coder/coder / bufferedReconnectingPTY

Struct bufferedReconnectingPTY

agent/reconnectingpty/buffered.go:22–38  ·  view source on GitHub ↗

bufferedReconnectingPTY provides a reconnectable PTY by using a ring buffer to store scrollback.

Source from the content-addressed store, hash-verified

20// bufferedReconnectingPTY provides a reconnectable PTY by using a ring buffer to store
21// scrollback.
22type bufferedReconnectingPTY struct {
23 command *pty.Cmd
24
25 activeConns map[string]net.Conn
26 circularBuffer *circbuf.Buffer
27
28 ptty pty.PTYCmd
29 process pty.Process
30
31 metrics *prometheus.CounterVec
32
33 state *ptyState
34 // timer will close the reconnecting pty when it expires. The timer will be
35 // reset as long as there are active connections.
36 timer *time.Timer
37 timeout time.Duration
38}
39
40// newBuffered starts the buffered pty. If the context ends the process will be
41// killed.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected