MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / format_endpoints

Function format_endpoints

crates/openshell-cli/src/run.rs:7768–7774  ·  view source on GitHub ↗

Format a `NetworkPolicyRule`'s endpoints as a compact string.

(rule: &openshell_core::proto::NetworkPolicyRule)

Source from the content-addressed store, hash-verified

7766
7767/// Format a `NetworkPolicyRule`'s endpoints as a compact string.
7768fn format_endpoints(rule: &openshell_core::proto::NetworkPolicyRule) -> String {
7769 rule.endpoints
7770 .iter()
7771 .map(format_endpoint)
7772 .collect::<Vec<_>>()
7773 .join(", ")
7774}
7775
7776/// Render an endpoint as `host:port [layer, …allows…, …denies…]` so a reader
7777/// can tell L4-only access apart from a method/path-scoped L7 grant. The L7

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected