ct_containers_container (ct_containers v0.1.1)

Link to this section Summary

Link to this section Types

Link to this type

container_engine_cb_module/0

-type container_engine_cb_module() :: module().
Link to this type

container_id/0

-type container_id() :: string() | binary().
Link to this type

ct_container_context/0

-type ct_container_context() ::
    #{image => binary(),
      wait_strategy => wait_strategy(),
      wait_timeout => number(),
      port_mapping => list(),
      labels => labels(),
      binds => list(),
      network => {atom(), binary()},
      alias => binary(),
      env => #{binary() => binary()},
      container_engine_module => module()}.
-type labels() :: #{binary() => binary()}.
Link to this type

port_mapping/0

-type port_mapping() :: {1..65535, tcp | udp}.
Link to this type

wait_strategy/0

-type wait_strategy() ::
    fun((container_id(), container_engine_cb_module(), wait_strategy_ctx()) ->
            {true | false, wait_strategy_ctx()}).
Link to this type

wait_strategy_ctx/0

-type wait_strategy_ctx() :: map().

Link to this section Functions

Link to this function

callback_mode()

Link to this function

creating(_, _, Data)

Link to this function

idle(_, _, Data)

Link to this function

port(Pid, PortMapping)

Link to this function

ready(_, _, Data)

Link to this function

start_container(Pid, ContainerSpec)

-spec start_container(pid(), ct_container_context()) -> ok.
Link to this function

start_link(Context)

Link to this function

starting(_, _, Data)

Link to this function

stop_container(Pid)

-spec stop_container(pid()) -> ok.
Link to this function

terminate(Reason, _, Data)