Documentation
¶
Overview ¶
Package e2b runs sandboxes on E2B: each is a small VM that starts in under a second. It talks to E2B's HTTP API directly, so it needs no SDK; the TS runtime has the same adapter (E2BSandbox). A sandbox shuts itself down at its timeout, which the runtime pushes back while the thread uses it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
// Template is what each sandbox starts from. Default "base".
Template string
// Network is "none" (the default), "all", or "allow" with Allow: only
// these hosts.
Network ports.SandboxNetwork
// Domain defaults to e2b.app.
Domain string
// APIURL defaults to https://api.<domain>.
APIURL string
// SandboxURL sends every call to one sandbox here instead of
// https://49983-<id>.<domain>, naming the sandbox in a header. For
// tests and proxies.
SandboxURL string
// HTTPClient defaults to http.DefaultClient.
HTTPClient *http.Client
}
Options shapes the provider.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider makes E2B sandboxes.