ocibuild_http_sup (ocibuild v0.10.4)

View Source

OTP supervisor for HTTP operations.

This supervisor manages the HTTP pool and workers for parallel downloads and uploads.

Architecture:

ocibuild_http_sup (one_for_one)
 ocibuild_http_pool (gen_server) [transient]
   - Coordinates parallel HTTP operations
   - Enforces max concurrency

 ocibuild_http_worker (gen_server) [temporary]
    - Started dynamically via start_worker/2
    - Owns unique httpc profile
    - Cleans up in terminate/2

Summary

Functions

Start the HTTP supervisor.

Start a new HTTP worker to execute a task.

Functions

init/1

start_link()

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

Start the HTTP supervisor.

Returns {ok, Pid} on success or {error, Reason} on failure.

start_worker(Task, ReplyTo)

-spec start_worker(Task :: map(), ReplyTo :: pid()) -> {ok, pid()} | {error, term()}.

Start a new HTTP worker to execute a task.

The worker will execute the task and send the result back to ReplyTo. Workers are temporary and will terminate after completing their task.