Module locus_loader

Behaviours: gen_server.

Data Types

blob_format()

blob_format() = tgz | tarball | gzip | gzipped_mmdb | mmdb | unknown

error_retry_behaviour()

error_retry_behaviour() = {backoff, milliseconds_interval()} | {exponential_backoff, exponential_backoff_params()}

event()

event() = locus_maxmind_download:event() | locus_http_download:event() | locus_filesystem_load:event() | locus_custom_fetcher:event() | event_cache_attempt_finished()

event_cache_attempt_finished()

event_cache_attempt_finished() = {cache_attempt_finished, locus_filesystem_store:path(), ok} | {cache_attempt_finished, locus_filesystem_store:path(), {error, term()}}

exponential_backoff_params()

exponential_backoff_params() = #{min_interval := milliseconds_interval(), max_interval := milliseconds_interval(), growth_base := milliseconds_interval(), growth_exponent := number()}

fetcher_opt()

fetcher_opt() = locus_maxmind_download:opt() | locus_http_download:opt()

loader_opt()

loader_opt() = {update_period, milliseconds_interval()} | {error_retries, error_retry_behaviour()} | no_cache

maxmind_origin_params()

maxmind_origin_params() = #{license_key := unicode:unicode_binary(), date => calendar:date()}

milliseconds_interval()

milliseconds_interval() = pos_integer()

msg()

msg() = {event, event()} | {load_success, source(), calendar:datetime(), locus_mmdb:database()} | {load_failure, source(), Reason::term()}

opt()

opt() = loader_opt() | fetcher_opt()

origin()

origin() = {maxmind, atom()} | {http, locus_http_download:url()} | {filesystem, locus_filesystem_load:path()} | locus:custom_fetcher()

provider_source()

provider_source() = {maxmind, atom()}

source()

source() = {remote, provider_source()} | {remote, locus_http_download:url()} | locus_filesystem_load:source() | locus_custom_fetcher:source()

uniformly_distributed_update_period()

uniformly_distributed_update_period() = #{min := pos_integer(), max := pos_integer()}

update_period()

update_period() = pos_integer() | uniformly_distributed_update_period()


Generated by EDoc