Documentation
¶
Overview ¶
Package containerd implements the runtime boundary with the containerd Go client.
Index ¶
- Constants
- Variables
- func RunLogWriter(args []string) bool
- type Adapter
- func (a *Adapter) Close() error
- func (a *Adapter) DialExecution(ctx context.Context, executionID string, port uint16) (net.Conn, error)
- func (a *Adapter) Forget(ctx context.Context, executionID string) error
- func (a *Adapter) Recover(ctx context.Context, request r1sruntime.StartRequest, ...) error
- func (a *Adapter) Start(ctx context.Context, request r1sruntime.StartRequest, ...) error
- func (a *Adapter) Stop(ctx context.Context, executionID string) error
- type Config
Constants ¶
const ( // DefaultAddress is the standard containerd Unix socket. DefaultAddress = "/run/containerd/containerd.sock" // DefaultNamespace isolates r1s metadata from other containerd consumers. DefaultNamespace = "r1s" )
Variables ¶
var ( ErrInvalidConfig = errors.New("invalid containerd runtime configuration") ErrInvalidRequest = errors.New("invalid containerd start request") ErrExecutionConflict = r1sruntime.ErrExecutionConflict ErrExecutionMissing = r1sruntime.ErrExecutionMissing ErrClosed = errors.New("containerd runtime is closed") )
Functions ¶
func RunLogWriter ¶ added in v0.1.1
RunLogWriter handles the private shim entry point, independent of r1sd lifetime.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter exposes the runtime contract while executionManager owns lifecycle coordination independently of transport connections and caller contexts.
func (*Adapter) Close ¶
Close releases the containerd client connection. It deliberately does not stop tasks: execution lifetime is independent of the r1sd process lifetime.
func (*Adapter) DialExecution ¶ added in v0.3.1
func (a *Adapter) DialExecution(ctx context.Context, executionID string, port uint16) (net.Conn, error)
DialExecution opens a connection only for a live execution tracked by this adapter; its fingerprint binds the backend lookup to the recovered workload.
func (*Adapter) Forget ¶ added in v0.1.1
Forget drops terminal in-memory bookkeeping after durable result expiry.
func (*Adapter) Recover ¶
func (a *Adapter) Recover(ctx context.Context, request r1sruntime.StartRequest, reporter r1sruntime.Reporter) error
Recover reattaches to a matching task without creating or starting one. Missing runtime objects are reported so durable state can be reconciled.
func (*Adapter) Start ¶
func (a *Adapter) Start(ctx context.Context, request r1sruntime.StartRequest, reporter r1sruntime.Reporter) error
Start creates and starts one task. Repeating the same execution ID and specification returns success without creating another container or task.