Lookup the effective port_policy for an instance: admin override wins, otherwise fall back to the instance-reported policy. `None` means neither is set — caller fails closed and may schedule a lazy fetch.
(&self, instance_id: &str)
| 955 | /// otherwise fall back to the instance-reported policy. `None` means |
| 956 | /// neither is set — caller fails closed and may schedule a lazy fetch. |
| 957 | pub(crate) fn instance_port_policy(&self, instance_id: &str) -> Option<&PortPolicy> { |
| 958 | let info = self.state.instances.get(instance_id)?; |
| 959 | info.admin_port_policy |
| 960 | .as_ref() |
| 961 | .or(info.port_policy.as_ref()) |
| 962 | } |
| 963 | |
| 964 | /// Update an instance's port_policy (used after a lazy fetch via Info()). |
| 965 | /// Persists to the WaveKV store so other gateway nodes pick it up. |
no test coverage detected