Karta.ETS (Karta v1.0.0)

Reads a named ETS table that another process owns, without raising while that process is restarting.

A table belongs to the process that created it, and is deleted when that process stops. Another process that reads the table in that moment gets ArgumentError: argument error from :ets.lookup/2 — a crash in a request or an SMTP connection caused by the restart of a cache or a limiter. lookup/2 returns :miss for that moment; each caller decides what a miss means: a cache miss, a cold cache, or, for a limit that must not be bypassed, a refusal.

Summary

Functions

The rows of table for key, as :ets.lookup/2 returns them, or :miss when the table does not exist (its owner is restarting).

Functions

lookup(table, key)

@spec lookup(atom(), term()) :: [tuple()] | :miss

The rows of table for key, as :ets.lookup/2 returns them, or :miss when the table does not exist (its owner is restarting).