reckon_db_gateway_worker (reckon_db v1.2.7)
View SourceGateway worker for reckon-db
This worker process acts as the gateway endpoint for a store. It registers with reckon-gater and handles incoming requests routed through the gateway API.
Multiple gateway workers can run per store for load balancing. Each worker registers independently with the gater's Ra-based worker registry.
The message format matches the ExESDB.GatewayWorker from the original Elixir implementation.
Summary
Functions
Start a gateway worker for a store Workers are not locally registered to allow multiple per store. They register with reckon-gater for discovery and load balancing.
Types
-type store_config() :: #store_config{store_id :: atom(), data_dir :: string(), mode :: single | cluster, timeout :: pos_integer(), writer_pool_size :: pos_integer(), reader_pool_size :: pos_integer(), gateway_pool_size :: pos_integer(), options :: map()}.
-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
-spec start_link(store_config()) -> {ok, pid()} | {error, term()}.
Start a gateway worker for a store Workers are not locally registered to allow multiple per store. They register with reckon-gater for discovery and load balancing.