e2bapi

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Caller

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

Caller adapts the E2B REST API to ecctl's spec execution engine.

func NewCaller

func NewCaller(getenv func(string) string) (*Caller, error)

NewCaller resolves the E2B endpoint and project API key from the standard E2B environment variables.

func NewCallerWithClient

func NewCallerWithClient(rawEndpoint, apiKey string, client *http.Client) (*Caller, error)

NewCallerWithClient is an explicit constructor used by tests and self-hosted E2B installations.

func NewCallerWithRegion

func NewCallerWithRegion(ctx context.Context, region string, getenv func(string) string) (*Caller, error)

NewCallerWithRegion uses a supported FC sandbox region only when neither E2B_API_URL nor E2B_DOMAIN is set. Missing or unsupported regions use Hangzhou.

func (*Caller) Call

func (c *Caller) Call(ctx context.Context, operationName string, request map[string]any) (map[string]any, error)

func (*Caller) ValidateOperation

func (c *Caller) ValidateOperation(_ context.Context, resource, action string, input map[string]any) error

ValidateOperation runs before the engine sends the first workflow request. In particular, a supported timeout update must not precede a rejected network update. Only the explicitly selected ACS compatibility profile restricts APIs.

Jump to

Keyboard shortcuts

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