Back to Microsandbox

Go Examples

sdk/go/examples/README.md

0.5.11017 B
Original Source

Go Examples

Run from sdk/go:

sh
go run ./examples/basic

Examples

ExampleDescription
basicCreate a sandbox, run commands, use filesystem and metrics
detachedDetached lifecycle, reattach, stop, and remove
diskBuild and mount a raw ext4 disk image
errorsTyped error handling with IsKind and errors.As
filesystemFilesystem read/write/list/stat/copy/streaming operations
image-cacheList, get, inspect, and garbage-collect cached OCI images
metricsPoint-in-time and streaming metrics
networkPresets, DNS, TLS, and custom network settings
patchesPre-boot rootfs patches
portsPublish guest TCP ports on host ports
secretsSecret placeholder injection
snapshot-forkCreate a stopped-sandbox snapshot and boot a fork from it
streamingStreaming exec, signals, and cancellation
tlsTLS interception configuration
volumesNamed volume lifecycle