Help us shape the future of Go! Take the 2026 Go Developer Survey

edges

package
v0.62.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExcludedResourceTypes = map[string]struct{}{
	"Applications.Core/applications": {},
	"Applications.Core/environments": {},
	"Radius.Core/applications":       {},
	"Radius.Core/environments":       {},
	"Radius.Core/recipePacks":        {},
}

ExcludedResourceTypes lists resource types that are never valid endpoints for a Dependency edge. Both the CLI static-graph builder (pkg/cli/graph) and the Radius.Core preview runtime handler (pkg/corerp/frontend/controller/applications/v20250801preview) share this policy so the two graphs surface an identical set of edges for the same input.

The types listed here are structural containers (applications, environments, recipe packs) — Bicep authors typically write `dependsOn` against them incidentally, but they are not resources the graph is meant to visualise as endpoints.

Functions

func MergeDependencyEdges

MergeDependencyEdges overlays caller-supplied Dependency edges onto an already-built ApplicationGraphResponse. For each entry dependsOnInfo[source] = [target, ...] the function adds an outbound Kind: Dependency edge on source -> target (and mirrors it as an inbound edge on target) provided that:

  • Both source and target exist in graph.Resources.
  • Neither source nor target has a Type in ExcludedResourceTypes.
  • source does not already carry any outbound edge to target (Connection wins; a Dependency the caller sent twice collapses).
  • The entry itself is well-formed (Outbound + Kind: Dependency).

ID matching is case-insensitive because Radius/ARM resource IDs are canonically case-insensitive but casing varies in practice (server-returned IDs use "resourcegroups" while cli.RequireScope produces "resourceGroups"). Emitted edges reference the canonical ID carried on graph.Resources so downstream consumers can look up either endpoint by exact-string match against the resources list.

Every resource's Connections slice is re-sorted at the end by (Direction, Kind, ID) so downstream diff/hash consumers see a stable order.

The function is a no-op when graph is nil or dependsOnInfo is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL