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

Method effective_ports

crates/openshell-prover/src/policy.rs:195–203  ·  view source on GitHub ↗

The effective list of ports for this endpoint.

(&self)

Source from the content-addressed store, hash-verified

193
194 /// The effective list of ports for this endpoint.
195 pub fn effective_ports(&self) -> Vec<u16> {
196 if !self.ports.is_empty() {
197 return self.ports.clone();
198 }
199 if self.port > 0 {
200 return vec![self.port];
201 }
202 vec![]
203 }
204
205 /// The set of HTTP methods this endpoint allows. Empty means all (L4-only).
206 pub fn allowed_methods(&self) -> HashSet<String> {

Callers 4

index_endpointsMethod · 0.80
encode_policy_allowsMethod · 0.80
encode_l7_enforcementMethod · 0.80

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected