docker

package
v0.0.0-...-c7cde22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2026 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageResize

type MessageResize struct {
	Resize  bool `json:"resize"`
	Columns uint `json:"columns"`
	Rows    uint `json:"rows"`
}

MessageResize 终端大小调整消息

type Turn

type Turn struct {
	// contains filtered or unexported fields
}

Turn 容器终端转发器

func NewTurn

func NewTurn(ctx context.Context, ws *websocket.Conn, containerID string, command []string, sock string) (*Turn, error)

NewTurn 创建容器终端转发器

func (*Turn) Close

func (t *Turn) Close()

Close 关闭连接

func (*Turn) Handle

func (t *Turn) Handle(ctx context.Context) error

Handle 处理 WebSocket 消息

func (*Turn) Wait

func (t *Turn) Wait()

Wait 等待容器输出并转发到 WebSocket

func (*Turn) Write

func (t *Turn) Write(p []byte) (n int, err error)

Write 实现 io.Writer 接口,将容器输出写入 WebSocket

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL