Expand description
One docker inspect for every container a status query probes (issue #243).
--list used to start one or two docker inspect processes per record
(the live state, the process IDs, the removal check), one after another,
and --status up to three for its one record. While a query runs, this
module asks Docker once for every field those probes read, and answers the
per-record docker inspect -f <format> <target> calls from that answer.
Docker prints one line per found container, in argument order, and one
No such container: <target> line on stderr per missing one. Each line is
matched back to its target by name or ID prefix (Docker’s own lookup
order), so the answer does not depend on the line order. A target the
batch cannot account for (an old or stubbed docker, a daemon error) is not
answered, and its per-record probe runs as before.
Constants§
- BATCH_
FIELDS - Fields of the batched inspect, in output order.
Functions§
- batch_
format - The Go template of the batched inspect.
- docker_
probe_ targets - Containers the status probes of these records would inspect. Records whose container is already marked removed are skipped: they are never probed.
- parse_
batch_ inspect - Match a batched inspect answer to its targets; unanswered targets are absent from the result.
- prefetched_
inspect - Answer
docker inspect -f <format> <target>from the batch, orNonewhen the batch has no answer and the probe must run. - with_
docker_ inspect_ batch - Run
querywith the docker probes ofrecordsanswered by one inspect. Nested calls reuse the outer answer.
Type Aliases§
- Batch
Answers - Answers per target: fields, or
Nonefor a target Docker reported missing. - Batch
Row - Fields of one found container, keyed by template field.