Launches the database loader and later shares the unpacked database,
as well as any updates to it, through persistent_term.
Summary
Functions
Returns the database version based on its build epoch (UNIX timestamp).
Types
-type event() :: locus_loader:event() | event_load_attempt_finished().
-type event_load_attempt_finished() :: {load_attempt_finished, locus_loader:source(), {ok, Version :: calendar:datetime()}} | {load_attempt_finished, locus_loader:source(), {error, term()}}.
-type opt() :: database_opt() | locus_loader:opt().
-type origin() :: locus_loader:origin().
-opaque state()
-type static_child_spec() :: #{id := term(), start := {locus_database, start_link, [atom() | origin() | [opt()], ...]}, restart := permanent, shutdown := non_neg_integer(), type := worker, modules := [locus_database, ...]}.
Functions
-spec dynamic_child_spec(term()) -> supervisor:child_spec().
-spec find(atom()) -> {ok, locus_mmdb:database(), locus_loader:source(), calendar:datetime()} | {error, database_not_loaded} | {error, database_unknown}.
-spec static_child_spec(term(), atom(), origin(), [opt()]) -> static_child_spec().
-spec version(BuildEpoch) -> Version when BuildEpoch :: non_neg_integer(), Version :: calendar:datetime().
Returns the database version based on its build epoch (UNIX timestamp).