opensandbox

package
v0.0.14-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: MIT Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package opensandbox runs Core-managed sandboxes on an operator's OpenSandbox server through its official Go SDK. Sandboxes are found by their ownership metadata, so the adapter keeps no receipts or state of its own.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDirect

BuildDirect builds the Provider for one direct-mode selection.

func Operations

func Operations() providercontract.Operations

Operations is this adapter's complete authored resource contract. OpenSandbox pause is specific to its runtime, so the checkpoint lifecycle stays unsupported.

func Policy

func Policy() sandbox.DeploymentPolicy

func Setup

func Setup() sandbox.SetupDeclaration

Setup declares how the console connects an OpenSandbox server. The adapter reads its configuration and credential field names from here.

Types

type ConfigurationAdapter

type ConfigurationAdapter struct{}

func (ConfigurationAdapter) Decode

func (ConfigurationAdapter) DecodeInput

func (ConfigurationAdapter) DecodeInput(public, secret json.RawMessage) (sandbox.Configuration, error)

func (ConfigurationAdapter) DiscoverSelection

func (ConfigurationAdapter) Encode

func (ConfigurationAdapter) Equal

func (ConfigurationAdapter) Normalize

func (ConfigurationAdapter) Requirements

func (ConfigurationAdapter) ResolveChange

func (a ConfigurationAdapter) ResolveChange(next, previous sandbox.Selection) (sandbox.Selection, error)

ResolveChange inherits the previous key when the change supplies none.

func (ConfigurationAdapter) VerifyCredential

VerifyCredential is read-only and bounded: the key must list sandboxes, and every Core-owned reference must list sandboxes of this installation.

func (ConfigurationAdapter) WithCredential

func (ConfigurationAdapter) WithCredential(owner, candidate sandbox.Configuration) (sandbox.Configuration, error)

type DeploymentConfiguration

type DeploymentConfiguration struct {
	CredentialSupplied bool   `json:"-"`
	APIKey             string `json:"-"`
	APIURL             string `json:"api_url"`
	Image              string `json:"image"`
}

DeploymentConfiguration keeps the API key out of JSON and diagnostics; ConfigurationAdapter.Encode owns the public projection. APIURL is the server origin: the adapter appends /v1.

func (*DeploymentConfiguration) HasCredential

func (c *DeploymentConfiguration) HasCredential() bool

func (*DeploymentConfiguration) MarshalJSON

func (*DeploymentConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON blocks accidental serialization.

func (*DeploymentConfiguration) ReplacesCredential

func (c *DeploymentConfiguration) ReplacesCredential() bool

func (*DeploymentConfiguration) String

func (c *DeploymentConfiguration) String() string

type Provider

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

Provider runs sandboxes on one OpenSandbox server. A sandbox is identified by its ownership metadata alone.

func (*Provider) Create

func (p *Provider) Create(ctx context.Context, b sandbox.Bootstrap) (sandbox.Info, error)

func (*Provider) GetInfo

func (p *Provider) GetInfo(ctx context.Context, r sandbox.Reference) (sandbox.Info, error)

func (*Provider) Initial

func (*Provider) Kill

func (p *Provider) Kill(ctx context.Context, r sandbox.Reference) error

Kill deletes every sandbox of the allocation after verifying that all of them are owned, then confirms none is left.

func (*Provider) KillCompute

func (*Provider) Observe

func (p *Provider) Observe(ctx context.Context, target runtimeobs.Target) (runtimeobs.Sample, error)

Observe reads execd's metrics for one running, owned sandbox. It never writes, renews or restarts anything.

func (*Provider) ProviderOperations

func (*Provider) ProviderOperations() providercontract.Operations

func (*Provider) Renew

func (p *Provider) Renew(ctx context.Context, r sandbox.Reference) (sandbox.Info, error)

Renew extends the native lease of a running sandbox. Any other state is reported, never renewed.

func (*Provider) RestorePreparation

func (*Provider) RestorePreparation(context.Context, sandbox.Reference, string) (bool, error)

func (*Provider) RunCommand

RunCommand runs once and never replays. Stdin is staged in a private file so that confidential bytes never enter argv.

func (*Provider) SavePreparation

func (*Provider) SavePreparation(context.Context, sandbox.Reference, string) error

Jump to

Keyboard shortcuts

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