node

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package node implements NodeSandboxControl, which wraps our sandbox-host RPC service to satisfy the SandboxControl interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeSandboxControl

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

NodeSandboxControl wraps a sandbox-host RPC client to provide SandboxControl for node (on-premise gVisor + ZFS) sandboxes.

func NewNodeSandboxControl

func NewNodeSandboxControl(client api.SandboxService, opts ...Option) *NodeSandboxControl

NewNodeSandboxControl creates a NodeSandboxControl wrapping the given sandbox-host RPC client.

func (*NodeSandboxControl) Capabilities

Capabilities returns the node sandbox provider capabilities.

func (*NodeSandboxControl) CreateSandbox

CreateSandbox provisions a new sandbox by calling CreateSession on the sandbox-host. Field mapping:

  • Template -> BaseSnapshot
  • Labels -> Labels
  • Resources -> logged (resource limits set at sandbox-host level)

func (*NodeSandboxControl) DestroySandbox

func (n *NodeSandboxControl) DestroySandbox(ctx context.Context, sandboxID string) error

DestroySandbox tears down a sandbox by calling DestroySession.

func (*NodeSandboxControl) GetProcessStatus

GetProcessStatus queries the status of a launched process.

func (*NodeSandboxControl) KillProcess

KillProcess sends a signal to a running process via the sandbox-host.

func (*NodeSandboxControl) LaunchProcess

LaunchProcess starts a long-running process inside the sandbox by calling the sandbox-host LaunchProcess RPC.

func (*NodeSandboxControl) PauseSandbox

func (n *NodeSandboxControl) PauseSandbox(ctx context.Context, sandboxID string) error

PauseSandbox pauses a sandbox by calling PauseSession.

func (*NodeSandboxControl) ResumeSandbox

func (n *NodeSandboxControl) ResumeSandbox(ctx context.Context, sandboxID string) error

ResumeSandbox resumes a paused sandbox by calling ResumeSession.

type Option

type Option func(*NodeSandboxControl)

Option configures a NodeSandboxControl.

func WithDefaultQuota

func WithDefaultQuota(bytes int64) Option

WithDefaultQuota sets the default disk quota (bytes) for new sandboxes.

func WithLogger

func WithLogger(logger *slog.Logger) Option

WithLogger sets the structured logger.

Jump to

Keyboard shortcuts

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