Plexus.Run.Config (Plexus v0.1.0)

Copy Markdown View Source

Lock-free read access to run-scoped resources.

The global directory contains only run_id -> config_table pointers. The actual client, ETS table ids, limits and counters live in a table owned by the run's owner process and disappear when that run terminates.

Summary

Functions

fetch(run_id)

@spec fetch(term()) :: {:ok, map()} | {:error, :run_not_found}

fetch!(run_id)

@spec fetch!(term()) :: map()

update(run_id, fun)

@spec update(term(), (map() -> map())) :: :ok | {:error, :run_not_found}