Counterpoint.Store (counterpoint v0.1.0)

Copy Markdown View Source

ETS-backed registry of named DCB store references.

Counterpoint.Supervisor calls init/0 and put/2 during startup. All other Counterpoint modules call lookup!/1 to obtain the store ref needed by the DCB layer.

You should not need to interact with this module directly in application code.

Summary

Functions

Create the ETS table (idempotent — safe to call multiple times).

Return the DCB store ref for name.

Register a DCB store ref under name.

Functions

init()

Create the ETS table (idempotent — safe to call multiple times).

lookup!(name)

Return the DCB store ref for name.

Raises ArgumentError if no store has been registered under that name.

put(name, ref)

Register a DCB store ref under name.