engine library
The Docker Engine surface rig uses.
Published so rig's own tooling (rig_cli) and rig modules can reach it.
Not part of rig's stable API: it changes with what rig needs.
Classes
- AcquiredContainer
- A container that exists, is running, and is ready to use.
- ContainerInspect
- A container as it appears on inspection.
- ContainerSummary
- A container as it appears in a listing.
- DockerEngine
- The slice of the Docker Engine API that rig needs.
- EngineVersion
- What the daemon reports about itself.
- ExecResult
- What a command run inside a container produced.
- NetworkSummary
- A network as it appears in a listing.
- RigLabels
- What rig can read back off a container it finds.
Enums
- HealthStatus
- Docker's view of a container's healthcheck.
Constants
- defaultMaxMountBytes → const int
- Mounted files up to this size are hashed by content; larger ones by size and mtime.
- rigHashLabel → const String
- The spec hash. This is the search key for sharing.
- rigLifetimeLabel → const String
-
sharedordedicated. - rigMarkerLabel → const String
-
Present on every container rig creates.
rig prunetreats it as the permission to delete. - rigProjectLabel → const String
- The pubspec name of the package whose tests created this.
- rigSummaryLabel → const String
-
A short, human-readable description for
rig ls.
Functions
-
acquireContainer(
{required ContainerSpec spec, required DockerEngine engine, required StateDir stateDir, required String project, String host = '127.0.0.1', Now now = DateTime.now, Sleeper sleep = _delay}) → Future< AcquiredContainer> -
Get a running, ready container for
spec. -
buildRigLabels(
{required ContainerSpec spec, required String hash, required String project}) → Map< String, String> - The labels rig puts on a container it creates.
-
buildRigNetworkLabels(
) → Map< String, String> - The labels rig puts on a network it creates.
-
connectToDocker(
{Map< String, String> ? environment, String? home}) → Future<DockerEngine> - Find a Docker daemon, check it answers and speaks a version rig knows, and return a client for it.
-
currentEngine(
{Future< DockerEngine> connect() = connectToDocker}) → Future<DockerEngine> - The Docker client for this isolate, connected on first use.
-
overrideEngine(
DockerEngine engine) → void -
Makes
enginethe client this isolate uses. For rig's own tests and for module tests. -
resetEngine(
) → Future< void> - Drops the cached client, closing it if there is one to close.
-
rigContainers(
DockerEngine engine) → Future< List< ContainerSummary> > - Every container rig made, whatever its lifetime or health.
-
specHash(
ContainerSpec spec, {int maxMountBytes = defaultMaxMountBytes}) → String - The key rig uses to decide whether a container it already runs can serve this spec.
-
summarizeSpec(
ContainerSpec spec) → String -
A one-line description of
specfor human eyes.