@shumoku/core · 0.4.0 · function
deriveMappingFromGraph
Derive a legacy `MetricsMapping` from a resolved graph's bindings. - Node host binding → `mapping.nodes[node.id]`. - Link interface binding lives on a `NodePort`; we attribute it to the link whose endpoint references that port, keyed `link.id || link-${i}` to match the rest of the server (server.ts / topologies.ts). Pure; never mutates the input.
deriveMappingFromGraph(graph: NetworkGraph, activeSourceIds?: ReadonlySet<string>): MetricsMapping Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
graph | NetworkGraph | No additional description. | — |
activeSourceIds | ReadonlySet<string> | No additional description. | — |
Returns
MetricsMapping