reckon_db_gateway_sup (reckon_db v1.2.6)

View Source

Gateway supervisor for reckon-db

Manages a pool of gateway workers that provide the external interface for the event store. Starts last in the supervision hierarchy to ensure the system is fully operational before accepting external requests.

Gateway Worker Pool

The supervisor starts gateway_pool_size workers (default 1) for load distribution. Each worker registers with reckon-gater independently, allowing round-robin load balancing across all workers.

Gateway Integration

Gateway workers register themselves with reckon-gater (when available) to enable load-balanced, distributed access to the event store.

When reckon-gater is not available, the gateway workers still run locally but are not registered for external load balancing.

Summary

Functions

Start the gateway supervisor

Types

store_config/0

-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()}.

Functions

start_link(Store_config)

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

Start the gateway supervisor