MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / instance_port_policy_view

Method instance_port_policy_view

gateway/src/main_service.rs:975–981  ·  view source on GitHub ↗

Snapshot view of an instance's port-policy state for inspection.

(&self, instance_id: &str)

Source from the content-addressed store, hash-verified

973
974 /// Snapshot view of an instance's port-policy state for inspection.
975 pub(crate) fn instance_port_policy_view(&self, instance_id: &str) -> Option<PortPolicyView> {
976 let info = self.state.instances.get(instance_id)?;
977 Some(PortPolicyView {
978 instance_reported: info.port_policy.clone(),
979 admin_override: info.admin_port_policy.clone(),
980 })
981 }
982
983 /// Set an admin override. Errors if the instance is not registered.
984 pub(crate) fn set_admin_port_policy(

Callers 1

Calls 2

cloneMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected