Skip to main content

Module container_cmd

Module container_cmd 

Source
Expand description

Container engine command lines (pure; unit-tested without an engine).

The image is a minimal layer over an operator-pinned base (by digest) holding only the one verified binary, built locally: no registry pull other than the pinned base, which must already be present.

Structs§

CmdOutput
Output of one engine CLI call.
RunLimits
Resource and isolation flags for a run.
RunSpec
Everything a run needs.
SystemRunner
Runs commands with tokio::process.

Enums§

Engine
A container engine.

Constants§

COG_PATH
Where the binary lives in the image.
CONTAINER_USER
Unprivileged uid:gid inside the container (nobody).
DATA_DIR
Writable tmpfs for COGNITUM_COG_DATA_DIR.
ENGINE_STARTUP_SECS
Allowance on top of max_runtime_secs for container creation / VM boot.
PIDS_LIMIT
Task (process + thread) cap for a cog container.

Traits§

CommandRunner
Runs engine CLI commands. Mocked in unit tests; SystemRunner in use.

Functions§

build_cmd
build command.
container_name
Container-name-safe form of an instance id.
dockerfile
Dockerfile for the one-binary layer.
image_tag
Image tag for a binary: weftos-cog/<id>:<16 hex of its BLAKE3>.
parse_inspect
Parse (running, exit_code) from inspect output.
rm_cmd
Force-remove command.
rmi_cmd
Remove-image command.
run_cmd
run command.
stop_cmd
stop command.
validate_base_image
Validate an operator-pinned base image reference (name@sha256:<64 hex>).