Documentation
¶
Index ¶
- func NewFactory(cfg Config) sandboxpkg.Factory
- func Preflight(ctx context.Context, cfg PreflightConfig) error
- type Config
- type DirEntry
- type Edit
- type EditResult
- type ExecOptions
- type ExecResult
- type FilesystemPolicy
- type HTTPOptions
- type HTTPResult
- type HTTPStream
- type Host
- type Policy
- type PolicyCompatibilityError
- type PreflightConfig
- type ProcessHandle
- type ProcessRequest
- type ReadResult
- type Session
- type StatResult
- type TempFile
- type WriteResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶
func NewFactory(cfg Config) sandboxpkg.Factory
NewFactory returns a Factory backed by a Docker container-per-session strategy.
func Preflight ¶
func Preflight(ctx context.Context, cfg PreflightConfig) error
Preflight checks daemon reachability and image availability. A missing image is pulled automatically; the caller is expected to have built or published the image ahead of time for dev builds (the pull will fail with a registry error in that case).
Types ¶
type Config ¶
type Config struct {
// Image is the container image to use. Required.
Image string
// ContainerPathPrefix / HostPathPrefix enable path alignment when anna
// runs inside a container and talks to the daemon on the host (DooD).
// Both fields are filled by applyDooDDefaults in the runner; callers
// outside that path should leave them empty.
ContainerPathPrefix string
HostPathPrefix string
}
Config configures the docker sandbox factory. All fields are populated by the runner glue layer — there are no user-facing knobs. The image is version-locked to the anna binary (via internal/config.SandboxDockerImage) and the path-prefix fields are auto-derived from ANNA_HOME_HOST when anna runs inside a container (see internal/agent/runner/sandbox_dood.go).
func (Config) TranslateToDaemonPath ¶
TranslateToDaemonPath rewrites an anna-view absolute path into the path the daemon will use as a bind-mount source. When prefix translation is not configured, the input is returned unchanged.
type DirEntry ¶
type DirEntry = sandboxpkg.DirEntry
Type aliases for the pkg/sandbox contract — keeps import noise minimal in callers.
type Edit ¶
type Edit = sandboxpkg.Edit
Type aliases for the pkg/sandbox contract — keeps import noise minimal in callers.
type EditResult ¶
type EditResult = sandboxpkg.EditResult
Type aliases for the pkg/sandbox contract — keeps import noise minimal in callers.
type ExecOptions ¶
type ExecOptions = sandboxpkg.ExecOptions
Type aliases for the pkg/sandbox contract — keeps import noise minimal in callers.
type ExecResult ¶
type ExecResult = sandboxpkg.ExecResult
Type aliases for the pkg/sandbox contract — keeps import noise minimal in callers.
type FilesystemPolicy ¶
type FilesystemPolicy = sandboxpkg.FilesystemPolicy
Type aliases for the pkg/sandbox contract — keeps import noise minimal in callers.
type HTTPOptions ¶
type HTTPOptions = sandboxpkg.HTTPOptions
Type aliases for the pkg/sandbox contract — keeps import noise minimal in callers.
type HTTPResult ¶
type HTTPResult = sandboxpkg.HTTPResult
Type aliases for the pkg/sandbox contract — keeps import noise minimal in callers.
type HTTPStream ¶
type HTTPStream = sandboxpkg.HTTPStream
Type aliases for the pkg/sandbox contract — keeps import noise minimal in callers.
type Host ¶
type Host = sandboxpkg.Host
Type aliases for the pkg/sandbox contract — keeps import noise minimal in callers.
type Policy ¶
type Policy = sandboxpkg.Policy
Type aliases for the pkg/sandbox contract — keeps import noise minimal in callers.
type PolicyCompatibilityError ¶
type PolicyCompatibilityError = sandboxpkg.PolicyCompatibilityError
Type aliases for the pkg/sandbox contract — keeps import noise minimal in callers.
type PreflightConfig ¶
PreflightConfig configures a Preflight check.
type ProcessHandle ¶
type ProcessHandle = sandboxpkg.ProcessHandle
Type aliases for the pkg/sandbox contract — keeps import noise minimal in callers.
type ProcessRequest ¶
type ProcessRequest = sandboxpkg.ProcessRequest
Type aliases for the pkg/sandbox contract — keeps import noise minimal in callers.
type ReadResult ¶
type ReadResult = sandboxpkg.ReadResult
Type aliases for the pkg/sandbox contract — keeps import noise minimal in callers.
type Session ¶
type Session = sandboxpkg.Session
Type aliases for the pkg/sandbox contract — keeps import noise minimal in callers.
type StatResult ¶
type StatResult = sandboxpkg.StatResult
Type aliases for the pkg/sandbox contract — keeps import noise minimal in callers.
type TempFile ¶
type TempFile = sandboxpkg.TempFile
Type aliases for the pkg/sandbox contract — keeps import noise minimal in callers.
type WriteResult ¶
type WriteResult = sandboxpkg.WriteResult
Type aliases for the pkg/sandbox contract — keeps import noise minimal in callers.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package dockerclient wraps the moby Go SDK (github.com/moby/moby/client) to manage sandbox containers for the docker sandbox backend.
|
Package dockerclient wraps the moby Go SDK (github.com/moby/moby/client) to manage sandbox containers for the docker sandbox backend. |