Documentation
¶
Overview ¶
Package runtime defines the OCI-runtime boundary used by the allocator core.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrExecutionMissing means durable allocator state has no matching runtime object. ErrExecutionMissing = errors.New("runtime execution is missing") // ErrExecutionConflict means a runtime object exists but its authority or specification differs. ErrExecutionConflict = errors.New("runtime execution conflicts with durable state") )
var ErrLogOffset = errors.New("log offset is outside retained data")
var ErrLogsMissing = errors.New("logs are missing or expired")
var ErrTunnelUnsupported = errors.New("runtime cannot dial execution ports")
ErrUnavailable reports that an OCI adapter has not been configured yet.
Functions ¶
This section is empty.
Types ¶
type Completion ¶
Completion reports the terminal runtime outcome for an execution.
type Forgetter ¶ added in v0.1.1
Forgetter drops only terminal runtime bookkeeping after durable result expiry.
type PortDialer ¶ added in v0.3.1
PortDialer connects only to a port inside the specified execution's network namespace. Implementations must never fall back to the allocator's network.
type Recoverer ¶
type Recoverer interface {
Recover(context.Context, StartRequest, Reporter) error
}
Recoverer reattaches monitoring to an existing execution without creating or restarting a missing workload.
type Reporter ¶
type Reporter func(Completion) error
Reporter applies a terminal runtime outcome to the allocator.
type Resources ¶ added in v0.1.1
type Resources struct {
MemoryBytes int64 `json:"memory_bytes"`
CPUMilli int64 `json:"cpu_milli"`
Pids int64 `json:"pids"`
}
Resources is an allocator-owned profile, independent of a concrete runtime. All-zero is the legacy unbounded profile; configured profiles must set all limits.
type Runtime ¶
type Runtime interface {
Start(context.Context, StartRequest, Reporter) error
Stop(context.Context, string) error
}
Runtime starts and stops executions idempotently by execution ID.
The context bounds the Start or Stop operation only. A successful Start must not tie the execution lifetime to context cancellation or a network link.
type StartRequest ¶
type StartRequest struct {
ExecutionID string
RunID string
Attempt uint64
Client []byte
Workload *r1sv1.Workload
Policy *r1sv1.ExecutionPolicy
Resources Resources
// StartedAt is the durable beginning of local policy timing. Runtimes use
// the current time when it is zero for compatibility with direct callers.
StartedAt time.Time
}
StartRequest is an immutable execution specification passed to a runtime.
type Unavailable ¶
type Unavailable struct{}
Unavailable is an explicit placeholder for callers that have not configured a production runtime. It never claims to have started or stopped an execution.
func (Unavailable) Start ¶
func (Unavailable) Start(context.Context, StartRequest, Reporter) error
Directories
¶
| Path | Synopsis |
|---|---|
|
Package containerd implements the runtime boundary with the containerd Go client.
|
Package containerd implements the runtime boundary with the containerd Go client. |