lexbor_erl_sup (lexbor_erl v0.3.0)

View Source

Top-level supervisor for lexbor_erl application.

This supervisor manages both the pool coordinator and all worker processes using a one_for_one strategy. This provides:

  • Individual worker restart: Only crashed worker restarts
  • Fault isolation: Worker crashes don't affect other workers
  • Limited blast radius: Only documents on crashed worker are lost
  • Automatic recovery: Workers rejoin pool after restart

The pool coordinator is started first, followed by all worker processes. Each worker is supervised independently.

Summary

Functions

Start the supervisor with the specified pool size.

Functions

init(_)

start_link(PoolSize)

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

Start the supervisor with the specified pool size.

Creates the pool coordinator and all worker processes.