View Source Etso.Adapter.TableRegistry (Logflare Etso v1.1.2)
Provides convenience function to spin up a Registry, which is used to hold the Table Servers (registered by GenServer when starting up), alongside their ETS tables (registered when the Table Server starts).
Summary
Functions
Returns Child Specification for the Table Registry that will be associated with the repo
.
Returns the ETS table associated with the given repo
which is used to hold data for schema
.
Registers the ETS table associated with the given repo
which is used to hold data for schema
.
Functions
@spec child_spec(Etso.repo()) :: Supervisor.child_spec()
Returns Child Specification for the Table Registry that will be associated with the repo
.
@spec get_table(Etso.repo(), Etso.schema()) :: {:ok, Etso.table()} | {:error, term()}
Returns the ETS table associated with the given repo
which is used to hold data for schema
.
@spec register_table(Etso.repo(), Etso.schema(), Etso.table()) :: :ok | {:error, term()}
Registers the ETS table associated with the given repo
which is used to hold data for schema
.