View Source locus_maxmind_download (locus v2.3.12)

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

Summary

Types

-type event() :: locus_http_download:event() | {checksum, locus_http_download:event()}.
-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().
-type opt() :: {license_key, binary() | string()} | {date, calendar:date()} | locus_http_download:opt().
-opaque state()
-type success() :: locus_http_download:success().