View Source Avrora.Config behaviour (avrora v0.30.1)

Configuration for Avrora.

Options:

* `otp_app` name of the OTP application to use for addition `schemas_path` root folder configuration, default `nil`
* `schemas_path` path to local schema files, default `./priv/schemas`
* `registry_url` URL for Schema Registry, default `nil`
* `registry_auth` authentication settings for Schema Registry, default `nil`
* `registry_user_agent` HTTP `User-Agent` header for Schema Registry requests, default `Avrora/<version> Elixir`
* `registry_ssl_opts` arbitrary SSL client options in Erlang format (take precedence over other SSL options) (see https://www.erlang.org/docs/26/man/ssl#type-client_option), default `nil`
* `registry_ssl_cacerts` DER-encoded trusted certificate (not combined) (see https://www.erlang.org/docs/26/man/ssl#type-client_cacerts), default `nil`
* `registry_ssl_cacert_path` path to a file containing PEM-encoded CA certificates, default `nil`
* `registry_schemas_autoreg` automatically register schemas in Schema Registry, default `true`
* `convert_null_values` convert `:null` values in the decoded message into `nil`, default `true`
* `convert_map_to_proplist` bring back old behavior and configure decoding AVRO map-type as proplist, default `false`
* `names_cache_ttl` duration to cache global schema names millisecods, default `:infinity`
* `decoder_hook` function to amend decoded payload, default `fn _, _, data, fun -> fun.(data) end`

Internal use interface:

* `file_storage` module which handles files in `schemas_path`, default `Avrora.Storage.File`
* `memory_storage` module which handles memory operations, default `Avrora.Storage.Memory`
* `registry_storage` module which handles Schema Registry requests, default `Avrora.Storage.Registry`
* `http_client` module which handles HTTP client requests to Schema Registry, default `Avrora.HTTPClient`
* `ets_lib` module which creates ETS tables with call `Module.new/0`

Summary

Callbacks

convert_map_to_proplist()

@callback convert_map_to_proplist() :: boolean()

convert_null_values()

@callback convert_null_values() :: boolean()

decoder_hook()

@callback decoder_hook() :: (any(), any(), any(), any() -> any())

ets_lib()

@callback ets_lib() :: module() | atom()

file_storage()

@callback file_storage() :: module()

http_client()

@callback http_client() :: module()

memory_storage()

@callback memory_storage() :: module()

names_cache_ttl()

@callback names_cache_ttl() :: integer() | atom()

registry_auth()

@callback registry_auth() :: tuple() | nil

registry_schemas_autoreg()

@callback registry_schemas_autoreg() :: boolean()

registry_ssl_cacert_path()

@callback registry_ssl_cacert_path() :: String.t() | nil

registry_ssl_cacerts()

@callback registry_ssl_cacerts() :: binary() | nil

registry_ssl_opts()

@callback registry_ssl_opts() :: [:ssl.tls_option()] | nil

registry_storage()

@callback registry_storage() :: module()

registry_url()

@callback registry_url() :: String.t() | nil

registry_user_agent()

@callback registry_user_agent() :: String.t() | nil

schemas_path()

@callback schemas_path() :: String.t()