Compose
Discovery, logs and controls for existing Compose containers. No CLI or source files are needed. The caller owns the supplied client; this integration never closes it. HTTP failures return SDK errors; transport/decoding failures and cancellation propagate. Snapshots are not atomic: a container removed between list and inspect can fail discovery.
Functions
Lists all containers, inspects Compose-labeled candidates, and groups them by label values. Includes stopped containers and incomplete labels. Projects without remaining containers (including network/volume-only projects) are not discovered. No label paths are opened.
Returns the observed project, or successful null if it has no discovered containers.
Returns the observed service, or successful null if no such service was discovered.
Reads all replicas of one service; equivalent to logs(project, setOf(service), ...).
Cold, backpressured flow: discovers once per collection and opens one log stream per selected container. Fails before opening streams if the selection exceeds maxStreams. New replicas require recollection. Missing projects/services produce an empty flow. One-off and unknown one-off containers are included by default; false selects only confirmed regular replicas. services selects exact service names: null includes all containers (even without service labels); an empty set produces an empty flow without Docker requests. Blank names are rejected. The supplied set is copied when this method is called.
Restart existing regular replicas of one service. See the service-set overload.
Restart existing containers selected by exact project and service labels. Null services selects the whole project; an empty set makes no Docker requests. By default only confirmed regular replicas are included; includeOneOff also includes one-off containers and containers with unknown one-off metadata. Discovery completes before mutations. Requests run sequentially in snapshot order, continuing after HTTP errors and preserving each SDK result in the returned report. Start/stop accept HTTP 304 (already in the requested state) as success. An outer success means the batch completed, not that every container succeeded. Missing projects/services produce an empty report. No resources are created or removed. Transport/decoding failures and cancellation propagate, stopping subsequent requests; already applied changes remain and a failed request may have reached Docker. No dependency ordering, readiness checks, retries or rollback are provided. timeoutSeconds is the per-container stop grace period: null uses Docker defaults, -1 waits indefinitely, 0 kills immediately, positive values wait that many seconds.
Start existing regular replicas of one service. See the service-set overload.
Start existing containers selected by exact project and service labels. Null services selects the whole project; an empty set makes no Docker requests. By default only confirmed regular replicas are included; includeOneOff also includes one-off containers and containers with unknown one-off metadata. Discovery completes before mutations. Requests run sequentially in snapshot order, continuing after HTTP errors and preserving each SDK result in the returned report. Start/stop accept HTTP 304 (already in the requested state) as success. An outer success means the batch completed, not that every container succeeded. Missing projects/services produce an empty report. No resources are created or removed. Transport/decoding failures and cancellation propagate, stopping subsequent requests; already applied changes remain and a failed request may have reached Docker. No dependency ordering, readiness checks, retries or rollback are provided.
Stop existing regular replicas of one service. See the service-set overload.
Stop existing containers selected by exact project and service labels. Null services selects the whole project; an empty set makes no Docker requests. By default only confirmed regular replicas are included; includeOneOff also includes one-off containers and containers with unknown one-off metadata. Discovery completes before mutations. Requests run sequentially in snapshot order, continuing after HTTP errors and preserving each SDK result in the returned report. Start/stop accept HTTP 304 (already in the requested state) as success. An outer success means the batch completed, not that every container succeeded. Missing projects/services produce an empty report. No resources are created or removed. Transport/decoding failures and cancellation propagate, stopping subsequent requests; already applied changes remain and a failed request may have reached Docker. No dependency ordering, readiness checks, retries or rollback are provided. timeoutSeconds is the per-container stop grace period: null uses Docker defaults, -1 waits indefinitely, 0 kills immediately, positive values wait that many seconds.