Documentation
¶
Index ¶
- Variables
- func ImageDigest(root string) (string, error)
- func SnapshotDigest(files []guest.File) (string, error)
- type Artifact
- type Command
- type CommandResult
- type CommandSetupError
- type KubernetesRuntimeConfig
- type Patch
- type Runtime
- func (r *Runtime) ApplyPatch(ctx context.Context, workspace Workspace, patches []Patch) error
- func (r *Runtime) Close() error
- func (r *Runtime) CollectArtifact(ctx context.Context, workspace Workspace, name string) (Artifact, error)
- func (r *Runtime) Destroy(ctx context.Context, workspace Workspace) error
- func (r *Runtime) ExecuteBoundedCommand(ctx context.Context, workspace Workspace, command Command) (CommandResult, error)
- func (r *Runtime) PreparePinnedWorkspace(ctx context.Context, in WorkspaceRequest) (Workspace, error)
- type RuntimeConfig
- type SandboxRuntime
- type Snapshot
- type Workspace
- type WorkspaceRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBoundary = errors.New("sandbox request violates execution boundary")
Functions ¶
func ImageDigest ¶
Types ¶
type CommandResult ¶
type CommandSetupError ¶
type CommandSetupError struct {
Result CommandResult
}
func (*CommandSetupError) Error ¶
func (e *CommandSetupError) Error() string
type KubernetesRuntimeConfig ¶
type KubernetesRuntimeConfig struct {
Namespace string `json:"namespace"`
RunnerID string `json:"-"`
RuntimeClassName string `json:"runtime_class_name,omitempty"`
ImagePullSecrets []string `json:"image_pull_secrets,omitempty"`
Images map[string]string `json:"images"`
Toolchains map[string]string `json:"toolchains"`
BrokerListenAddress string `json:"broker_listen_address,omitempty"`
BrokerAdvertiseAddress string `json:"broker_advertise_address,omitempty"`
}
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
func NewRuntime ¶
func NewRuntime(cfg RuntimeConfig) (*Runtime, error)
func (*Runtime) ApplyPatch ¶
func (*Runtime) CollectArtifact ¶
func (*Runtime) ExecuteBoundedCommand ¶
func (*Runtime) PreparePinnedWorkspace ¶
type RuntimeConfig ¶
type RuntimeConfig struct {
Backend string `json:"backend,omitempty"`
Kubernetes *KubernetesRuntimeConfig `json:"kubernetes,omitempty"`
Runsc string `json:"runsc"`
RunscSHA256 string `json:"runsc_sha256"`
Tool string `json:"tool"`
ToolSHA256 string `json:"tool_sha256"`
StateRoot string `json:"state_root"`
DependencyRoot string `json:"dependency_root,omitempty"`
CgroupRoot string `json:"cgroup_root"`
Images map[string]string `json:"images"`
Development bool `json:"development"`
Rootless bool `json:"rootless"`
MemoryBytes int64 `json:"memory_bytes"`
DiskBytes int64 `json:"disk_bytes"`
CPUs int64 `json:"cpus"`
MaxProcesses int64 `json:"max_processes"`
Fetch func(context.Context, WorkspaceRequest) (Snapshot, error) `json:"-"`
}
type SandboxRuntime ¶
type SandboxRuntime interface {
PreparePinnedWorkspace(context.Context, WorkspaceRequest) (Workspace, error)
ExecuteBoundedCommand(context.Context, Workspace, Command) (CommandResult, error)
ApplyPatch(context.Context, Workspace, []Patch) error
CollectArtifact(context.Context, Workspace, string) (Artifact, error)
Destroy(context.Context, Workspace) error
}
Click to show internal directories.
Click to hide internal directories.