Documentation
¶
Overview ¶
Package docker is a thin SDK adapter for the dedicated, colocated Runtime.
Index ¶
- func BuildNode(config sandbox.NodeConfig, _ sandbox.LocalOptions, result *sandbox.Built) (func(), error)
- func Operations() providercontract.Operations
- func Policy() sandbox.DeploymentPolicy
- func ValidateResources(r sandbox.Resources) error
- func ValidateSpecification(s sandbox.DeploymentSpec) error
- type Config
- type Native
- type Provider
- func (p *Provider) Create(ctx context.Context, b sandbox.Bootstrap) (sandbox.Info, error)
- func (p *Provider) DeleteSnapshot(context.Context, sandbox.Reference, sandbox.SnapshotIdentity) error
- func (p *Provider) GetCompute(context.Context, sandbox.Reference, sandbox.Compute) (sandbox.ComputeState, error)
- func (p *Provider) GetInfo(ctx context.Context, r sandbox.Reference) (sandbox.Info, error)
- func (p *Provider) Initial(context.Context, sandbox.Reference) (sandbox.Compute, error)
- func (p *Provider) Kill(ctx context.Context, r sandbox.Reference) error
- func (p *Provider) KillCompute(context.Context, sandbox.Reference, sandbox.Compute) error
- func (p *Provider) NewCompute(context.Context, sandbox.Reference, uint64, *sandbox.SnapshotIdentity) (sandbox.Compute, error)
- func (p *Provider) Observe(ctx context.Context, target runtimeobs.Target) (runtimeobs.Sample, error)
- func (*Provider) ProviderOperations() providercontract.Operations
- func (p *Provider) Renew(ctx context.Context, r sandbox.Reference) (sandbox.Info, error)
- func (p *Provider) Resume(context.Context, sandbox.ResumeRequest) (sandbox.ComputeState, error)
- func (p *Provider) ResumeCompute(context.Context, sandbox.Reference, sandbox.Compute) (sandbox.ComputeState, error)
- func (p *Provider) RunCommand(ctx context.Context, r sandbox.Reference, command sandbox.Command) (sandbox.CommandResult, error)
- func (p *Provider) RunCommandCompute(context.Context, sandbox.Reference, sandbox.Compute, sandbox.Command) (sandbox.CommandResult, error)
- func (p *Provider) Suspend(context.Context, sandbox.SuspendRequest) (sandbox.ComputeState, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildNode ¶ added in v0.0.10
func BuildNode(config sandbox.NodeConfig, _ sandbox.LocalOptions, result *sandbox.Built) (func(), error)
BuildNode constructs the node-local Docker adapter from a validated node configuration.
func Operations ¶
func Operations() providercontract.Operations
Operations is this adapter's complete authored resource contract.
func Policy ¶
func Policy() sandbox.DeploymentPolicy
func ValidateResources ¶
func ValidateSpecification ¶
func ValidateSpecification(s sandbox.DeploymentSpec) error
Types ¶
type Config ¶
type Config struct {
InstallationID, Image, Network, Seccomp string
NestedSandbox bool
Resources *sandbox.Resources
}
Config is trusted operator configuration, never public Session input. The immutable image contains the qualified native profile and all Runtime binaries. Seccomp is JSON content, not a path on the Docker host. Network must provide trusted daemon/model connectivity; native tool network policy is in the image.
type Native ¶ added in v0.0.10
type Native struct {
Host string `json:"host"`
Image string `json:"image"`
Network string `json:"network"`
SeccompFile string `json:"seccomp_file"`
NestedSandbox bool `json:"nested_sandbox"`
}
Native is the node configuration's native object for Docker. Image is the local ID of the installation's Runtime image, as this host's image store resolves it.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func (*Provider) DeleteSnapshot ¶
func (*Provider) GetCompute ¶
func (*Provider) Kill ¶
Kill is idempotent only for absence, not for errors or foreign ownership. It checks all resources before removing any and confirms removal of named volumes.
func (*Provider) KillCompute ¶
func (*Provider) NewCompute ¶
func (*Provider) Observe ¶
func (p *Provider) Observe(ctx context.Context, target runtimeobs.Target) (runtimeobs.Sample, error)
Observe is read-only. Inspect verifies allocation ownership before Docker statistics are requested; it never renews or changes the container.
func (*Provider) ProviderOperations ¶
func (*Provider) ProviderOperations() providercontract.Operations
func (*Provider) Renew ¶
Renew observes Docker state. Docker has no lease; service-owned expiry must be managed durably by Core. Never synthesize an expiry or revive a stopped Runtime.
func (*Provider) Resume ¶
func (p *Provider) Resume(context.Context, sandbox.ResumeRequest) (sandbox.ComputeState, error)
func (*Provider) ResumeCompute ¶
func (*Provider) RunCommand ¶
func (p *Provider) RunCommand(ctx context.Context, r sandbox.Reference, command sandbox.Command) (sandbox.CommandResult, error)
RunCommand is for trusted initialization only. Closing an exec attachment does not kill its process. On any uncertain outcome, the caller must reclaim the allocation with Kill instead of admitting native work or replaying the command.
func (*Provider) RunCommandCompute ¶
func (*Provider) Suspend ¶
func (p *Provider) Suspend(context.Context, sandbox.SuspendRequest) (sandbox.ComputeState, error)