virta v0.1.2 Virta.Registry
Link to this section Summary
Link to this section Functions
Link to this function
register(name, graph)
Registers a graph and generates the workflow
adder = Graph.new(type: :directed)
|> Graph.add_edge(
%Node{ module: Virta.Core.In, id: 0 },
%Node{ module: Virta.Math.Add, id: 1 },
label: %EdgeData{ from: :addend, to: :addend }
)
|> Graph.add_edge(
%Node{ module: Virta.Core.In, id: 0 },
%Node{ module: Virta.Math.Add, id: 1 },
label: %EdgeData{ from: :augend, to: :augend }
)
|> Graph.add_edge(
%Node{ module: Virta.Math.Add, id: 1 },
%Node{ module: Virta.Core.Out, id: 2 },
label: %EdgeData{ from: :sum, to: :output }
)
Virta.Registry.register("adder", adder)
Link to this function
unregister(name)
Unregister a graph and removes the workflow
Virta.Registry.unregister("adder")