locus_database (locus v2.3.14)

View Source

Launches locus_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

database_opt/0

-type database_opt() :: {event_subscriber, atom() | pid()}.

event/0

event_load_attempt_finished/0

-type event_load_attempt_finished() ::
          {load_attempt_finished, locus_loader:source(), {ok, Version :: calendar:datetime()}} |
          {load_attempt_finished, locus_loader:source(), {error, term()}}.

monitor/0

-type monitor() :: reference().

opt/0

-type opt() :: database_opt() | locus_loader:opt().

origin/0

-type origin() :: locus_loader:origin().

state/0

-opaque state()

static_child_spec/0

-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

version(BuildEpoch)

-spec version(BuildEpoch) -> Version
                 when BuildEpoch :: non_neg_integer(), Version :: calendar:datetime().

Returns the database version based on its build epoch (UNIX timestamp)