View Source Runbox.Runtime.ComponentNetwork behaviour (runbox v21.2.0)

Component network builds and validates run component dependency network.

To build this network, module uses dependencies defined by the scenario.

Summary

Functions

Creates base network with only template nodes

Main function. Given list of template modules, expands them into components network with input streams, timezips etc...

Return all input topic names that are being subscribed to in component network.

Types

@type component() :: any()
@type t() :: any()

Callbacks

Link to this callback

convert_to_network(list)

View Source
@callback convert_to_network([Runbox.ScenarioTemplate.t()]) :: t()
@callback create([Runbox.ScenarioTemplate.t()], Keyword.t()) ::
  {:ok, t()} | {:error, term()}
@callback input_topics(t()) :: [String.t()]

Functions

Link to this function

convert_to_network(scenario_type, scenario_templates)

View Source
@spec convert_to_network(Runbox.Scenario.Type.t(), [Runbox.ScenarioTemplate.t()]) ::
  t()

Creates base network with only template nodes

Link to this function

create(scenario_type, scenario_templates, opts \\ [])

View Source
@spec create(Runbox.Scenario.Type.t(), [Runbox.ScenarioTemplate.t()], Keyword.t()) ::
  {:ok, t()} | {:error, term()}

Main function. Given list of template modules, expands them into components network with input streams, timezips etc...

Options

  • :direct_ticking - if true (default), creates network using direct ticking
Link to this function

input_topics(scenario_type, component_network)

View Source
@spec input_topics(Runbox.Scenario.Type.t(), t()) :: [String.t()]

Return all input topic names that are being subscribed to in component network.

Link to this function

topology_sort(binary, network)

View Source
@spec topology_sort(Runbox.Scenario.Type.t(), t()) :: [component()]