- Fix finding all paths between a start and target node in a bread. This is
used for the debugging functions
Grains.debug_pull_chain/3(introduced with v1.5.0) and
Grains.debug_reply_chain/3(introduced with v.1.2.0). The previous implementation missed paths, as the set of visited vertices was global and not per-path.
pullalong all paths from one grain to a transitive predecessor.
Grains.Support.Constant, which is a grain that pushes a constant value only.
pull_with_tagin timers (
Grains.periodic/2,3), fix #33.
Grains.ghost/2,3to declare a "ghost" edge. This is an edge which is not used with push/pull, but which should be documented in the flow chart.
GenGrain.debug_reply_chain/3helper to flush a message on all paths from
Grains.Support to help with testing
When blackbox-testing a grain, it is common to use a pipeline like this:
Grains.Support.Publisher -> GrainUnderTest -> Grains.Support.Subscriber
With that setup,
GenServer.cast(publisher, message) results in
being pushed into the
GrainUnderTest. The messages which are pushed from
GrainUnderTest are received by the subscriber and forwarded to the test
process. The test process can then use
Grains now has helpers to reduce the amount of boilerplate for this setup. Use
Grains.Support.setup_test!/2 to set-up the recipe and grains, and inject publish
messages through the publisher with
Grains.Support.Transformerto transform messages in tests
- Add pull with tags
- Small bug fix
- Add more options to
- Return error on
push/pullwhen called from a non-grain process
- Add a sink to eat messages (
GenGrain.predecessors/0public. The functions return an error if called from outside of a grain.
- Remove default_grains argument from Bread creation
- Allow Grains.periodic with multiple successors
Grains.route/1,2function that allows filtering message via pattern
GenGrain.debug_reply_chain/2helper to debug asynchronous messages
Grains.Support.Utilswith helper functions to inject push/pull for testing.
Grains.Support.Traceto trace push/pull messages.
Grains.Recipe.to_mermaid/1,2to create a mermaid graph from a Recipe.
- Add pulling through
- Add pulling through timers
GenGrain.pull_with_tag/2,3. This function can be used to add information to a pull operation.
- Fixes an argument forwarding bug
Grains.Support.Cache, a simple caching grain
Grains.Support.Publisher, a simple publisher grain
Grains.Support.Subscriber, a simple subscriber grain
Grains.merge/2to merge two grains. The corresponding function for
Grains.Recipeexisted since 0.1.0.
Grains.Supervisor.which_grains/1to retrieve the running grains at runtime
GenServerreturn values in
GenGrain, making a grain more flexible
Grains.Support.DebugTimerto replace the default periodic timer for testing
- Adds setting a custom id