DETS-backed implementation of ExAtlas.Fly.TokenStorage.
Durable, zero-config storage. Survives VM restarts. Writes are serialized
through a GenServer to avoid DETS concurrency pitfalls; reads go direct via
:dets.lookup/2.
Storage path resolution
opts[:storage_path]at startup.config :ex_atlas, :fly, storage_path: "...".Application.app_dir(:ex_atlas, "priv/ex_atlas_fly")— works in dev/test.Path.join(System.tmp_dir!(), "atlas_fly")— used when the priv dir is read-only (Mix releases commonly are).
Tables
:ex_atlas_fly_tokens_cached—{app_name, token, expires_at}:ex_atlas_fly_tokens_manual—{app_name, token, nil}
If a DETS file fails to open cleanly (e.g. the VM was killed mid-write),
open_file is retried with repair: true. If that still fails, the file
is deleted and re-created — token data is always re-acquirable, so losing
the cache is strictly a perf regression, not a correctness one.
Summary
Functions
Returns a specification to start this module under a supervisor.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.