Kungfuig.Backend behaviour (Kungfuig v0.3.0) View Source

The scaffold for the backend watching the external config source.

Link to this section Summary

Callbacks

The implementation of the call to remote that retrieves the data

The key this particular config would be stored under, defaults to module name

The implementation of error reporting

The transformer that converts the retrieved data to internal representation

Link to this section Callbacks

Specs

get([Kungfuig.option()]) :: {:ok, any()} | {:error, any()}

The implementation of the call to remote that retrieves the data

Specs

key() :: atom()

The key this particular config would be stored under, defaults to module name

Specs

report(any()) :: :ok

The implementation of error reporting

Specs

transform(any()) :: {:ok, any()} | {:error, any()}

The transformer that converts the retrieved data to internal representation