internal/testcontainers_ffi
FFI to Elixir.Testcontainers top-level module functions.
Values
pub fn after_start(
builder: anything,
container: container.Container,
) -> Result(Nil, dynamic.Dynamic)
Call after_start for builders that need post-start hooks (e.g. Kafka).
Extracts the Docker HTTP connection from the Testcontainers GenServer
state and calls ContainerBuilder.after_start/3.
pub fn build_container(builder: anything) -> container.Container
Build a Container from any ContainerBuilder config struct.
Dispatches through Elixir’s ContainerBuilder protocol to convert
a builder (e.g. %RedisContainer{}) into a low-level %Container{}.
pub fn start(
container: container.Container,
) -> Result(container.Container, dynamic.Dynamic)
Start a container and wait until it is ready.
Uses an Erlang wrapper that normalizes 3-element error tuples
from wait strategies into standard 2-element {:error, reason}.
pub fn start_link() -> Result(dynamic.Dynamic, dynamic.Dynamic)
Start the Testcontainers GenServer.
Calls Testcontainers.start_link/0 which returns
{:ok, pid} or {:error, reason}.
pub fn stop_container(container_id: String) -> dynamic.Dynamic
Stop a running container by ID.
Calls Testcontainers.stop_container/1 which returns
:ok or {:error, reason}. Typed as Dynamic because :ok
is a bare atom, not a {:ok, value} tuple.