Porterage v0.1.0 Porterage.Fetcher behaviour View Source

Tries to fetch the configured data source and pass it on for delivery.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Callbacks

Execute a run of the fetcher module.

Optional state initialization.

Link to this section Types

Link to this type

fetch_result()

View Source
fetch_result() :: {:ok, state(), any()} | {:ok, state()}

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this section Callbacks

Link to this callback

fetch(state)

View Source
fetch(state :: any()) :: fetch_result()

Execute a run of the fetcher module.

Link to this callback

init(opts)

View Source (optional)
init(opts :: map()) :: state()

Optional state initialization.