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

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

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

The implementation of the call to remote that retrieves the data

@callback key() :: atom()

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

@callback report(any()) :: :ok

The implementation of error reporting

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

The transformer that converts the retrieved data to internal representation