hackney_conn_sup (hackney v4.0.1)

View Source

Supervisor for hackney_conn connection processes.

This is a simple_one_for_one supervisor that dynamically starts hackney_conn gen_statem processes for each connection.

Summary

Functions

Start a new connection process. Opts is a map with at least host, port, and transport.

Start the supervisor.

Stop all connection processes gracefully. Useful for test cleanup.

Stop a connection process gracefully.

Functions

init(_)

start_conn(Opts)

-spec start_conn(map()) -> {ok, pid()} | {error, term()}.

Start a new connection process. Opts is a map with at least host, port, and transport.

start_link()

-spec start_link() -> {ok, pid()} | {error, term()}.

Start the supervisor.

stop_all()

-spec stop_all() -> ok.

Stop all connection processes gracefully. Useful for test cleanup.

stop_conn(Pid)

-spec stop_conn(pid()) -> ok.

Stop a connection process gracefully.