OrchidStratum.MetaStorage.EtsAdapter (orchid_stratum v0.2.1)

Copy Markdown View Source

In-process ETS-backed adapter for OrchidStratum.BlobStorage.

This is the default Blob Store implementation. It stores all payloads in a single public ETS table, which makes it suitable for development, testing, and single-node deployments where cross-node replication is not required.

Lifecycle ⚠️

The ETS table is not linked to any supervision tree. If the process that called init/0 exits, the table is garbage-collected by the BEAM. For long-lived production use, create the table inside a supervised GenServer or use a more durable adapter (e.g. Mnesia, a Rust NIF store).

Usage

blob_ref = OrchidStratum.BlobStorage.EtsAdapter.init()

# Pass as the second element of the blob_conf tuple:
blob_conf = {OrchidStratum.BlobStorage.EtsAdapter, blob_ref}

# Then hand blob_conf to apply_cache/4 or put it in baggage manually:
opts = [
  baggage: %{blob_store: blob_conf},
  global_hooks_stack: [OrchidStratum.BypassHook]
]

Summary

Functions

init()