View Source locus_database (locus v2.3.7)
locus_database_loader
and later shares the unpacked database, as well as any updates to it, through persistent_term
.
Link to this section Summary
Functions
Returns the database version based on its build epoch (UNIX timestamp)
Link to this section Types
Specs
database_opt() :: {event_subscriber, atom() | pid()}.
Specs
event() :: locus_loader:event() | event_load_attempt_finished().
Specs
event_load_attempt_finished() :: {load_attempt_finished, locus_loader:source(), {ok, Version :: calendar:datetime()}} | {load_attempt_finished, locus_loader:source(), {error, term()}}.
Specs
monitor() :: reference().
Specs
opt() :: database_opt() | locus_loader:opt().
Specs
origin() :: locus_loader:origin().
Specs
state() :: #state{}.
Specs
Link to this section Functions
Specs
async_get_version_or_subscribe(atom()) -> {await, reference()}.
Specs
Specs
dynamic_child_spec(term()) -> supervisor:child_spec().
Specs
find(atom()) -> {ok, locus_mmdb:database(), locus_loader:source(), calendar:datetime()} | {error, database_not_loaded} | {error, database_unknown}.
Specs
Specs
Specs
Specs
Specs
Specs
Specs
static_child_spec(term(), atom(), origin(), [opt()]) -> static_child_spec().
Specs
stop(atom(), term()) -> ok | {error, not_found}.
Specs
terminate(term(), state()) -> ok.
Specs
version(BuildEpoch) -> Version when BuildEpoch :: non_neg_integer(), Version :: calendar:datetime().