Kira v0.1.1 Kira.Branch

Branches are a declarive means of specifying the indivisual nodes of graph of tasks.

Example

%Kira.Branch{
  name: :example.com,
  dependencies: [],
  apply: fn (context, _deps) ->
    fetcher = context[:fetcher]
    fetcher.(:get, url: "http://www.example.com")
  end
}

Link to this section Summary

Link to this section Types

Link to this type apply_t()
apply_t() :: (any(), dependencies() -> Kira.Util.result(any()))
Link to this type dependencies()
dependencies() :: %{required(atom()) => any()}
Link to this type on_apply_error_t()
on_apply_error_t() ::
  :undefined | (any(), dependencies(), any(), integer() -> retry())
Link to this type on_unapply_error_t()
on_unapply_error_t() ::
  :undefined | (any(), dependencies(), any(), integer() -> retry())
Link to this type retry()
retry() :: {:retry, boolean()} | {:retry_after, integer()}
Link to this type t()
t() :: %Kira.Branch{
  apply: apply_t(),
  dependencies: [atom()],
  name: atom(),
  on_apply_error: on_apply_error_t(),
  on_unapply_error: on_unapply_error_t(),
  unapply: unapply_t()
}
Link to this type unapply_t()
unapply_t() ::
  :undefined | (any(), dependencies(), any() -> Kira.Util.result(any()))