ocibuild_http_worker (ocibuild v0.10.4)

View Source

HTTP worker for executing single HTTP operations.

Each worker:

  • Owns its own httpc profile (isolation)
  • Executes a single task
  • Sends result back to pool
  • Terminates after completing task
  • Properly cleans up httpc in terminate/2

The httpc profile is set in the process dictionary so that HTTP helper functions in ocibuild_registry can access it.

Summary

Functions

handle_call(Request, From, State)

handle_cast(Msg, State)

handle_continue/2

handle_info(Msg, State)

init/1

start_link(Task, ReplyTo)

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

Start a new HTTP worker to execute a task.

The worker will:

  1. Start its own httpc profile
  2. Execute the task function
  3. Send result to ReplyTo
  4. Terminate

terminate/2