locus_maxmind_download (locus v2.3.14)

View Source

Downloads an unpacked database edition from MaxMind, as well as its checksum (which it then verifies), without blocking the caller.

Summary

Types

event/0

-type event() :: locus_http_download:event() | {checksum, locus_http_download:event()}.

msg/0

-type msg() ::
          {event, event()} |
          {finished, {error, no_license_key_defined}} |
          {finished, {error, {checksum_download, term()}}} |
          {finished, {error, {bad_checksum, #{expected := binary(), actual := binary()}}}} |
          {finished, {error, {bad_checksum_format, binary()}}} |
          locus_http_download:msg().

opt/0

-type opt() :: {license_key, binary() | string()} | {date, calendar:date()} | locus_http_download:opt().

state/0

-opaque state()

success/0

-type success() :: locus_http_download:success().