compute

package
v0.38.8 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package compute integrates a control-plane for ephemeral compute sandboxes (Firecracker microVMs). Datasources come from proxy discovery: the proxy holds the compute API URL and credentials, and the module exposes operations over sandboxes, images, async operations, SSH keys, and the service directory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

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

Module implements the module.Module interface for compute.

func New

func New() *Module

New creates a new compute module.

func (*Module) ApplyDefaults

func (m *Module) ApplyDefaults()

ApplyDefaults sets default values before validation.

func (*Module) DatasourceInfo

func (m *Module) DatasourceInfo() []types.DatasourceInfo

DatasourceInfo returns datasource metadata for datasources:// resources.

func (*Module) Examples

func (m *Module) Examples() map[string]types.ExampleCategory

Examples returns query examples for the compute module.

func (*Module) Init

func (m *Module) Init(_ []byte) error

Init is a no-op: the module's datasources come from proxy discovery via InitFromDiscovery.

func (*Module) InitFromDiscovery

func (m *Module) InitFromDiscovery(datasources []types.DatasourceInfo) error

InitFromDiscovery initializes the module from discovered datasources. Safe to call repeatedly: subsequent calls replace the datasource list in place so the proxy client's periodic refresh propagates without a restart.

Always writes the filtered list, including when empty — see the comment on the clickhouse module's InitFromDiscovery for the rationale.

func (*Module) Name

func (m *Module) Name() string

func (*Module) PythonAPIDocs

func (m *Module) PythonAPIDocs() map[string]types.ModuleDoc

PythonAPIDocs returns the compute module documentation.

func (*Module) SandboxEnv

func (m *Module) SandboxEnv() (map[string]string, error)

SandboxEnv returns environment variables for the sandbox.

func (*Module) Start

func (m *Module) Start(_ context.Context) error

Start performs async initialization.

func (*Module) Stop

func (m *Module) Stop(_ context.Context) error

Stop cleans up resources.

func (*Module) Validate

func (m *Module) Validate() error

Validate checks that the parsed config is valid.

Jump to

Keyboard shortcuts

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