View Source wpool_process_callbacks behaviour (worker_pool v6.2.0)
Link to this section Summary
Functions
Adds a callback module.
Sends a notification to all registered callback modules.
Removes a callback module.
Link to this section Types
-type event() :: handle_init_start | handle_worker_creation | handle_worker_death.
-type state() :: module().
Link to this section Callbacks
-callback handle_init_start(wpool:name()) -> any().
-callback handle_worker_creation(wpool:name()) -> any().
-callback handle_worker_death(wpool:name(), term()) -> any().
Link to this section Functions
-spec add_callback_module(wpool:name(), module()) -> ok | {error, any()}.
-spec notify(event(), #{event_manager := any(), _ => _}, [any()]) -> ok.
-spec remove_callback_module(wpool:name(), module()) -> ok | {error, any()}.