envd

command module
v0.0.0-...-4f35ab0 Latest Latest
Warning

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

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

README

envd

Daemon that runs inside a sandbox that allows interacting with the sandbox via calls from the SDK.

Development

Versioning

The envd version in pkg/version.go is maintained by release-please from the Conventional Commits merged since the last envd release; do not edit it by hand. A change that affects behavior (code, dependencies) ships under a feat or fix commit type, so that a version the orchestrator can gate on is cut. Pure comment or documentation changes use docs, a type the changelog hides, and cut no release; chore and refactor are visible in it and do cut one.

Running locally

Run the following command to (re)build the envd daemon and start a Docker container with envd running inside:

make start-docker

You can use E2B SDKs with env var E2B_DEBUG=true or with a debug parameter set to true when creating or connecting to a sandbox, to connect to the envd started with this command.

Generating API server stubs

Run the following command to install the necessary dependencies for generating server stubs:

make init-generate
Generating

After changing the API specs in ./spec/ run the following command to generate the server stubs:

make generate
Debugging

Run make run-debug and then connect to the port 2345 with a debugger or use the VSCode run/debug and run the "Debug envd" to build the envd, Docker, and start the debugging.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
api
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.
reaper
Package reaper tracks the helper processes envd forks for itself, so a live upgrade can hand their pids to the new envd.
Package reaper tracks the helper processes envd forks for itself, so a live upgrade can hand their pids to the new envd.
reexec
Package reexec lets a package run part of itself in a child process.
Package reexec lets a package run part of itself in a child process.
services/cpus
Package cpus brings the guest's online CPU set to a requested count by writing /sys/devices/system/cpu/cpuN/online.
Package cpus brings the guest's online CPU set to a requested count by writing /sys/devices/system/cpu/cpuN/online.
services/fsfreeze
Package fsfreeze freezes and thaws a mounted filesystem via the FIFREEZE / FITHAW ioctls.
Package fsfreeze freezes and thaws a mounted filesystem via the FIFREEZE / FITHAW ioctls.
services/memory
Package memory implements best-effort consolidation of envd's own anonymous heap before a snapshot.
Package memory implements best-effort consolidation of envd's own anonymous heap before a snapshot.

Jump to

Keyboard shortcuts

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