Reactor.Mermaid behaviour (reactor v0.15.0)

View Source

Converts Reactors and their related entities into a Mermaid diagram.

See Mermaid for more information.

Summary

Functions

Convert the Reactor into Mermaid.

Convert the Reactor into Mermaid

Types

options()

@type options() :: Keyword.t()

Callbacks

to_mermaid(arg1, options)

@callback to_mermaid(module() | struct(), options()) ::
  {:ok, Reactor.Mermaid.Node.t()} | {:error, any()}

Functions

to_mermaid(reactor, options \\ [])

@spec to_mermaid(module() | Reactor.t(), options()) ::
  {:ok, iodata()} | {:error, any()}

Convert the Reactor into Mermaid.

Options

  • :expand? (boolean/0) - Whether or not to expand composed Reactors The default value is false.

  • :describe? (boolean/0) - Whether or not to include descriptions, if available The default value is false.

  • :direction - The direction to render the flowchart Valid values are :top_to_bottom, :bottom_to_top, :right_to_left, :left_to_right The default value is :left_to_right.

  • :indent (non_neg_integer/0) - How much to indent the resulting mermaid The default value is 0.

  • :output - Specify the output format. iodata is more performant Valid values are :iodata, :binary The default value is :iodata.

to_mermaid!(reactor, options \\ [])

@spec to_mermaid!(module() | Reactor.t(), options()) :: iodata() | no_return()

Convert the Reactor into Mermaid

Raising version of to_mermaid/2