/exec API: drop session reconnection support (#487)

This commit is contained in:
edi-oai
2026-09-09 08:05:08 +01:00
committed by GitHub
parent 9ac6ca6326
commit 4cd43d2b5a
14 changed files with 106 additions and 1880 deletions
+11 -17
View File
@@ -10,26 +10,20 @@ import (
type FrameType string
const (
FrameTypeStdin FrameType = "stdin"
FrameTypeResize FrameType = "resize"
FrameTypeStdout FrameType = "stdout"
FrameTypeStderr FrameType = "stderr"
FrameTypeExit FrameType = "exit"
FrameTypeError FrameType = "error"
FrameTypeHistory FrameType = "history"
FrameTypeNoMoreHistory FrameType = "no_more_history"
FrameTypeAck FrameType = "ack"
FrameTypeDetach FrameType = "detach"
FrameTypeClose FrameType = "close"
FrameTypeStdin FrameType = "stdin"
FrameTypeResize FrameType = "resize"
FrameTypeStdout FrameType = "stdout"
FrameTypeStderr FrameType = "stderr"
FrameTypeExit FrameType = "exit"
FrameTypeError FrameType = "error"
)
type Frame struct {
Type FrameType `json:"type"`
Data []byte `json:"data,omitempty"`
Terminal *TerminalSize `json:"terminal,omitempty"`
Exit *Exit `json:"exit,omitempty"`
Error string `json:"error,omitempty"`
Watermark uint64 `json:"watermark,omitempty"`
Type FrameType `json:"type"`
Data []byte `json:"data,omitempty"`
Terminal *TerminalSize `json:"terminal,omitempty"`
Exit *Exit `json:"exit,omitempty"`
Error string `json:"error,omitempty"`
}
type Exit struct {
-15
View File
@@ -7,21 +7,6 @@ import (
"github.com/stretchr/testify/require"
)
func TestFrameRoundTripsWatermark(t *testing.T) {
frame := Frame{
Type: FrameTypeHistory,
Watermark: 42,
}
payload, err := json.Marshal(frame)
require.NoError(t, err)
var decoded Frame
err = json.Unmarshal(payload, &decoded)
require.NoError(t, err)
require.Equal(t, frame, decoded)
}
func TestFrameRoundTripsTerminalSize(t *testing.T) {
frame := Frame{
Type: FrameTypeResize,