node

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateSessionRequest

type CreateSessionRequest struct {
	SessionID         string
	LeaseID           string
	RunID             string
	Image             string
	WorkspaceHostPath string
	MemoryMB          int64
	CPURequest        float64
	NetworkMode       string
	DockerNetworkName string
}

type DockerRuntime

type DockerRuntime struct {
	Client *client.Client
}

func NewDockerRuntime

func NewDockerRuntime() (*DockerRuntime, error)

func (*DockerRuntime) CreateSession

func (r *DockerRuntime) CreateSession(req CreateSessionRequest) (string, error)

func (*DockerRuntime) Exec

func (r *DockerRuntime) Exec(containerID string, command []string, stream bool) (ExecResult, error)

func (*DockerRuntime) ExecWithWriters

func (r *DockerRuntime) ExecWithWriters(containerID string, command []string, stdout, stderr io.Writer) (ExecResult, error)

func (*DockerRuntime) Interrupt

func (r *DockerRuntime) Interrupt(containerID string) error

func (*DockerRuntime) Remove

func (r *DockerRuntime) Remove(containerID string) error

func (*DockerRuntime) SetCPUWeight

func (r *DockerRuntime) SetCPUWeight(ctx context.Context, containerID string, weight int64) error

func (*DockerRuntime) Stop

func (r *DockerRuntime) Stop(containerID string) error

type ExecResult

type ExecResult struct {
	ExecID   string
	ExitCode int
}

type Runtime

type Runtime interface {
	CreateSession(req CreateSessionRequest) (containerID string, err error)
	Exec(containerID string, command []string, stream bool) (ExecResult, error)
	Interrupt(containerID string) error
	Stop(containerID string) error
	Remove(containerID string) error
}

Jump to

Keyboard shortcuts

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