Oi.Compiler.RecipeBundle (oi v0.1.0)

Copy Markdown

Container for a compiled Orchid recipe and its associated metadata.

A RecipeBundle is the static output of Oi.Compiler.compile_graph/2 — it pairs an Orchid.Recipe with the boundary information (requires/exports) and the interventions bound to the nodes within this cluster.

Summary

Functions

Bind interventions to static recipe bundles, filtering by node membership.

Types

id()

@type id() :: String.t() | atom()

interventions_map()

@type interventions_map() :: %{
  required(Oi.Topology.Graph.PortRef.t()) =>
    {intervention_type :: atom(), payload :: term()}
}

t()

@type t() :: %Oi.Compiler.RecipeBundle{
  exports: [Orchid.Step.io_key()],
  interventions: interventions_map(),
  node_ids: [Oi.Topology.Graph.Node.id()],
  recipe: Orchid.Recipe.t(),
  requires: [Orchid.Step.io_key()]
}

Functions

bind_interventions(static_bundles, interventions_map)

@spec bind_interventions([t()], interventions_map()) :: [t()]

Bind interventions to static recipe bundles, filtering by node membership.

Only interventions whose target node belongs to a bundle's node_ids are attached to that bundle.