providers

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: 20 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

Node-local adapter configuration and construction.

Package providers is the explicit registration boundary for sandbox adapters. It performs read-only configuration work; it never allocates compute.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownProvider = fmt.Errorf("%w: unsupported sandbox provider", sandbox.ErrInvalid)

ErrUnknownProvider reports a provider kind that no adapter registers.

Functions

func Load

func Load(file string) (sandbox.NodeConfig, error)

Load rejects unknown fields. The selected adapter decodes native at Build.

func ValidateBinding

func ValidateBinding(adapter Adapter, provider sandbox.SandboxProvider) error

ValidateBinding catches construction that disagrees with its registration.

func ValidateRegistration

func ValidateRegistration(a Adapter) error

ValidateRegistration checks wiring before configuration parsing or construction. Only configuration requirements, the setup declaration and operation declarations are read, and the policy only for a declared default size, after every other check.

Types

type Adapter

type Adapter struct {
	NodeArtifacts []providerassets.Artifact
	Policy        sandbox.DeploymentPolicy
	Setup         sandbox.SetupDeclaration
	Configuration sandbox.ConfigurationAdapter
	BuildLocal    func(sandbox.NodeConfig, sandbox.LocalOptions, *sandbox.Built) (func(), error)
	BuildDirect   func(sandbox.DirectConfig) (sandbox.SandboxProvider, error)
	Mode          sandbox.DeploymentMode
	Operations    func() providercontract.Operations
}

Adapter describes configuration and transport independently of compute operations. Native operation support comes from the adapter-owned complete declaration.

type Registry

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

Registry holds the registered adapters. Core and the node program each build one with Builtin and pass it explicitly; there is no package-level lookup.

func Builtin

func Builtin() *Registry

Builtin returns a registry of the adapters built into this program.

func (*Registry) ArtifactCatalog

func (r *Registry) ArtifactCatalog() (map[string][]providerassets.Artifact, error)

ArtifactCatalog projects registered node requirements for Web and installers.

func (*Registry) Build

func (r *Registry) Build(config sandbox.NodeConfig, options sandbox.LocalOptions) (*sandbox.Built, func(), error)

Build validates the Core-owned part of a node configuration and passes it to the registered adapter. Local paths belong to the node; Core owns reservation capacity, execution resources and the immutable deployment release it enrolled with.

func (*Registry) BuildDirect

BuildDirect builds a direct-mode Provider and validates its binding.

func (*Registry) Decode

func (*Registry) DecodeInput

func (r *Registry) DecodeInput(kind string, public, credential json.RawMessage) (sandbox.Configuration, error)

func (*Registry) DeploymentContract added in v0.0.10

func (r *Registry) DeploymentContract() (python, typescript string, err error)

DeploymentContract projects the registered modes, policies and setup declarations into the node installer and the TypeScript client; no second provider list exists in another language. At most one Provider per mode is recommended.

func (*Registry) Describe

func (r *Registry) Describe(kind, installation string) (sandbox.Description, error)

Describe derives the description once for both preview and persistence. Its fingerprint identifies a namespace, never mutable capacity or a credential.

func (*Registry) DiscoverConfiguration

func (*Registry) DiscoverSelection added in v0.0.10

func (r *Registry) DiscoverSelection(ctx context.Context, c sandbox.DirectConfig) (sandbox.Selection, error)

DiscoverSelection resolves a direct candidate's omitted native values.

func (*Registry) Encode

func (*Registry) Equal

func (r *Registry) Equal(kind string, a, b sandbox.Configuration) (bool, error)

func (*Registry) Lookup

func (r *Registry) Lookup(kind string) (Adapter, error)

Lookup returns a registered adapter after validating its registration.

func (*Registry) Normalize

func (r *Registry) Normalize(s sandbox.Selection) (sandbox.Selection, error)

func (*Registry) RequiresPublicOrigin

func (r *Registry) RequiresPublicOrigin(kind string) (bool, error)

func (*Registry) ResolveChange

func (r *Registry) ResolveChange(next, previous sandbox.Selection) (sandbox.Selection, error)

func (*Registry) RetainedLimit

func (r *Registry) RetainedLimit(kind string, active, retained int) (int, error)

RetainedLimit keeps nodes without checkpoint support within their active capacity.

func (*Registry) SupportsCheckpoint

func (r *Registry) SupportsCheckpoint(kind string) (bool, error)

SupportsCheckpoint reports whether the provider declares checkpoint suspension.

func (*Registry) UsesCredential

func (r *Registry) UsesCredential(kind string) (bool, error)

func (*Registry) ValidateSpecification

func (r *Registry) ValidateSpecification(kind string, s sandbox.DeploymentSpec) error

func (*Registry) VerifyCredential added in v0.0.10

func (r *Registry) VerifyCredential(ctx context.Context, c sandbox.DirectConfig, refs []sandbox.Reference) error

VerifyCredential checks a candidate credential against owned resources.

func (*Registry) WithCredential

func (r *Registry) WithCredential(owner, candidate sandbox.Selection) (sandbox.Selection, error)

Jump to

Keyboard shortcuts

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