edge

package
v0.2.27 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(cfg *config.Config, stop <-chan os.Signal) error

Run starts the Edge mode client with auto-reconnect

Types

type Client

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

Client represents the Edge mode WebSocket client

func (*Client) HandleExecInput

func (c *Client) HandleExecInput(requestID string, data []byte) error

HandleExecInput processes input data for an active exec session

func (*Client) HandleExecRequest

func (c *Client) HandleExecRequest(ctx context.Context, req *protocol.RequestMessage)

HandleExecRequest processes an exec tunnel request

type DockerEvent added in v0.2.0

type DockerEvent struct {
	Type   string `json:"Type"`
	Action string `json:"Action"`
	Actor  struct {
		ID         string            `json:"ID"`
		Attributes map[string]string `json:"Attributes"`
	} `json:"Actor"`
	Time     int64 `json:"time"`
	TimeNano int64 `json:"timeNano"`
}

DockerEvent represents a Docker event from the events API

type ExecRequest

type ExecRequest struct {
	ContainerID string   `json:"containerId"`
	Cmd         []string `json:"cmd"`
	User        string   `json:"user,omitempty"`
	Tty         bool     `json:"tty"`
	Detach      bool     `json:"detach"`
}

ExecRequest represents a request to start an exec session

type ExecSession added in v0.1.0

type ExecSession struct {
	ExecID       string
	DockerExecID string
	Conn         *docker.HijackedConn
	Cancel       context.CancelFunc
}

ExecSession tracks an active exec/terminal session

type ExecStartRequest

type ExecStartRequest struct {
	Detach bool `json:"Detach"`
	Tty    bool `json:"Tty"`
}

ExecStartRequest is the body for starting an exec

type ExecTunnel

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

ExecTunnel handles interactive exec sessions through the WebSocket tunnel

func (*ExecTunnel) Close

func (t *ExecTunnel) Close()

Close closes the tunnel

func (*ExecTunnel) Resize

func (t *ExecTunnel) Resize(width, height int) error

Resize sends a terminal resize command

func (*ExecTunnel) Start

func (t *ExecTunnel) Start(ctx context.Context, tty bool) error

Start begins the exec session with hijacking

func (*ExecTunnel) Write

func (t *ExecTunnel) Write(data []byte) error

Write sends data to the exec stdin

type StreamContext

type StreamContext struct {
	RequestID string
	Cancel    context.CancelFunc
	Writer    io.Writer
}

StreamContext tracks an active streaming request

Jump to

Keyboard shortcuts

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