Interface Waitable
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
Healthcheck,LogLine,None,TcpPort
Strategy that determines when
start<ContainerName> considers a container ready. This is
a sealed contract: implementations are the records Healthcheck (waits for the image's
Docker HEALTHCHECK to report healthy), LogLine (waits for a regex match in
container logs), TcpPort (waits for a TCP port to accept connections), and None
(no readiness check). Serializable so values survive Gradle's configuration cache.-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic WaitableWait until the container's DockerHEALTHCHECKreportshealthy.static WaitableWait until a line matchingregexappears in the container's stdout/stderr stream.static Waitablenone()No readiness check; the start task returns as soon asdocker runreturns.static WaitabletcpPort(int port) Wait until the given TCP port inside the container accepts a connection.
-
Method Details
-
healthcheck
Wait until the container's DockerHEALTHCHECKreportshealthy. Fails fast at start time if the image declares no HEALTHCHECK.- Returns:
- a
Healthcheckmarker
-
logLine
Wait until a line matchingregexappears in the container's stdout/stderr stream.- Parameters:
regex- Java regular expression matched against each log line- Returns:
- a
LogLinestrategy bound toregex
-
tcpPort
Wait until the given TCP port inside the container accepts a connection.- Parameters:
port- container-side TCP port to probe- Returns:
- a
TcpPortstrategy bound toport
-
none
No readiness check; the start task returns as soon asdocker runreturns.- Returns:
- a
Nonemarker
-