Grains v0.1.2 Grains
Grains describes data flow as a graph with interchangeable parts.
To accomplish that grains divides the graph (Recipe) from the
implementation of the nodes (Grains).
Together these parts can be used to make a Bread which describes
how the graph translates to processes.
Each process has a symbolic short name, which is resolved
to the registered name of the process via a map (%Bread{}.process_map).
Link to this section Summary
Functions
This function describes the default implementations for auxiliary grains, for example the periodic timer. Currently these default grains are provided
Merges to grain maps, works the same as Map.merge/2. Seconds grains override first in case of a name clash.
Description of a periodic grain.
Link to this section Functions
default_grains()
This function describes the default implementations for auxiliary grains, for example the periodic timer. Currently these default grains are provided:
iex> Grains.default_grains()
%{periodic: Grains.Timer}
get_name(supervisor, short_name)
get_name(Grains.Supervisor.t(), atom()) :: atom()
make_bread_name(recipe, bread_id)
make_bread_name(Grains.Recipe.t(), atom()) :: atom()
make_name(recipe, bread_id, short_name)
make_name(Grains.Recipe.t(), atom(), atom()) :: atom()
merge(grains1, grains2)
Merges to grain maps, works the same as Map.merge/2. Seconds grains override first in case of a name clash.
merge_recipes(name, a, b)
new(map)
new_recipe(name, new)
See Grains.Recipe.new/2.
periodic(grain, period, opts \\ %{with_timestamps: false})
Description of a periodic grain.