public sealed class DockerPlacementRealms as containers. ADR-019's second backend.
Remarks
The same shape as ProcessPlacement — a port from a pool, the spec on the command line, ready from the process's own stdout — with the daemon doing the starting and the port publishing. What differs is worth stating:
⚠ There is no stdin, and there does not need to be. Placement.Process writes vixen-realm drain to a realm because doc 27 § Cost's L0 has no control plane to say it over. A Docker deployment is an L1 deployment by construction: it has an orchestrator, and a realm learns to drain from the reply to its own heartbeat. So Drain here is "wait for it to finish and kill it if it will not", and the polite half happens a layer up.
⚠ A realm container never restarts itself. RestartPolicy: no, because doc 27 § Health makes recovery a placement rather than a resurrection — a container the daemon brought back would be a shard the cluster had already written off, returning with no players and no map.
Fields and properties (1)
public const string BackendNameWhat this backend calls itself in a PlacementProbe.
Methods (8)
public DockerPlacement(DockerPlacementOptions options)Stands a backend up on the platform's default endpoint.
public DockerPlacement(DockerPlacementOptions options, DockerEngine engine, bool ownsEngine = false, TimeProvider? time = null)Stands a backend up on an engine the caller built.
public ValueTask<PlacementProbe> ProbeAsync(CancellationToken cancellation)Whether this backend can run here, and what it found.
public ValueTask<RealmInstance> StartAsync(RealmSpec spec, CancellationToken cancellation)Brings a realm up.
public ValueTask StopAsync(RealmInstanceId instance, StopMode mode, CancellationToken cancellation)Takes a realm down.
public ValueTask<IReadOnlyList<RealmInstance>> ListAsync(CancellationToken cancellation)What this backend believes is running.
public IAsyncEnumerable<PlacementEvent> WatchAsync(CancellationToken cancellation)Everything that happens to instances, as it happens.
public void Dispose()Stops following containers. Does not stop the containers.
Used by (1)
- DockerPlacementTestsVixen.Live.Placement.Docker.Tests