View Source locus_database (locus v2.3.6)

Launches 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

Link to this type

event_load_attempt_finished/0

View Source

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

static_child_spec() ::
    #{id := term(),
      start := {locus_database, start_link, [atom() | origin() | [opt()], ...]},
      restart := permanent,
      shutdown := non_neg_integer(),
      type := worker,
      modules := [locus_database, ...]}.

Link to this section Functions

Specs

version(BuildEpoch) -> Version
           when BuildEpoch :: non_neg_integer(), Version :: calendar:datetime().
Returns the database version based on its build epoch (UNIX timestamp)