Grains v0.3.7 Grains.Bread

A %Bread{} is the compiled version of Recipe plus Grains that allow the Supervisor to run the processes and wire them correctly.

Link to this section Summary

Functions

Takes a recipe, grains and optionally a map of default implementations and returns a bread. Does not start any processes yet.

Generates a random atom to be used as an id for the Bread

Link to this section Types

Link to this type

t()

t() :: %Grains.Bread{
  child_specs: term(),
  default_grains: term(),
  final_grains: term(),
  final_recipe: term(),
  id: term(),
  name: term(),
  original_grains: term(),
  original_recipe: term(),
  process_map: term(),
  routes: term(),
  sup: term()
}

Link to this section Functions

Link to this function

bake(recipe, grains, args \\ [])

Takes a recipe, grains and optionally a map of default implementations and returns a bread. Does not start any processes yet.

Optional Arguments

  • :default_grains Replace the default grains
  • :id Set a custom bread id

Generates a random atom to be used as an id for the Bread