Reaper class
Singleton that manages the Ryuk resource-reaper side-car container.
Ryuk is a small Docker helper that listens on a TCP socket and removes all Docker resources labelled with the current session ID when the TCP connection is dropped (i.e. when the test process exits). This ensures that containers, networks, and volumes do not accumulate even when the test process crashes.
Reaper is created lazily on the first call to getInstance. It starts the Ryuk container, establishes a persistent TCP connection, and sends the session-ID label registration message.
Lifecycle:
- getInstance — create or return the existing singleton.
- deleteInstance — close the Ryuk socket and remove the Ryuk container (used in tests that need a clean slate).
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
deleteInstance(
) → Future< void> - Closes the Ryuk TCP socket and removes the Ryuk container.
-
getInstance(
) → Future< Reaper> - Returns the singleton Reaper, creating it if necessary.