PhoenixGenApi.ConfigDb (PhoenixGenApi v1.1.2)
View SourceA GenServer-based cache for storing FunConfig structs, using an ETS table as the
backing store.
This cache provides fast, in-memory access to function configurations, which are
used by the Executor to handle incoming requests.
The cache is populated and updated by the ConfigPuller module, which fetches
configurations from remote nodes.
Summary
Functions
Adds a new function configuration to the cache.
Returns a specification to start this module under a supervisor.
Deletes a function configuration from the cache.
Retrieves a function configuration from the cache.
Returns a list of all request types (keys) in the cache.
Returns a list of all request types (keys) in the cache.
Starts the ConfigDb GenServer.
Updates an existing function configuration in the cache. If the configuration does not exist, it will be added.
Functions
@spec add(PhoenixGenApi.Structs.FunConfig.t()) :: :ok
Adds a new function configuration to the cache.
Returns a specification to start this module under a supervisor.
See Supervisor.
Deletes a function configuration from the cache.
@spec get(String.t(), String.t()) :: {:ok, PhoenixGenApi.Structs.FunConfig.t()} | {:error, :not_found}
Retrieves a function configuration from the cache.
Returns {:ok, config} if the configuration is found, or {:error, :not_found}
if it is not.
Returns a list of all request types (keys) in the cache.
@spec get_all_services() :: [String.t()]
Returns a list of all request types (keys) in the cache.
Starts the ConfigDb GenServer.
@spec update(PhoenixGenApi.Structs.FunConfig.t()) :: :ok
Updates an existing function configuration in the cache. If the configuration does not exist, it will be added.