reckon_db_emitter_pool (reckon_db v1.2.7)
View SourceEmitter pool supervisor for reckon-db
Supervises a pool of emitter workers for a single subscription. Each subscription can have multiple emitter workers for load distribution.
Summary
Functions
Generate the name for an emitter pool
Start an emitter pool for a subscription
Start the emitter pool supervisor
Stop an emitter pool by key (deprecated, use stop_emitter/2)
Stop an emitter pool for a subscription
Update an emitter pool configuration
Types
-type subscription() :: #subscription{id :: binary(), type :: subscription_type(), selector :: binary() | map(), subscription_name :: binary(), subscriber_pid :: pid() | undefined, created_at :: integer(), pool_size :: pos_integer(), checkpoint :: non_neg_integer() | undefined, options :: map()}.
-type subscription_type() :: stream | event_type | event_pattern | event_payload | tags.
Functions
Generate the name for an emitter pool
-spec start_emitter(atom(), subscription()) -> {ok, pid()} | {error, term()}.
Start an emitter pool for a subscription
-spec start_link(atom(), subscription()) -> {ok, pid()} | {error, term()}.
Start the emitter pool supervisor
Stop an emitter pool by key (deprecated, use stop_emitter/2)
-spec stop_emitter(atom(), subscription()) -> ok | {error, term()}.
Stop an emitter pool for a subscription
-spec update_emitter(atom(), subscription()) -> ok | {error, term()}.
Update an emitter pool configuration