(
endpoint: &NetworkEndpoint,
host: &str,
port: u32,
)
| 679 | } |
| 680 | |
| 681 | fn ensure_method_path_endpoint( |
| 682 | endpoint: &NetworkEndpoint, |
| 683 | host: &str, |
| 684 | port: u32, |
| 685 | ) -> Result<(), PolicyMergeError> { |
| 686 | if endpoint.protocol.is_empty() { |
| 687 | return Err(PolicyMergeError::EndpointHasNoL7Inspection { |
| 688 | host: host.to_string(), |
| 689 | port, |
| 690 | }); |
| 691 | } |
| 692 | if !matches!(endpoint.protocol.as_str(), "rest" | "websocket") { |
| 693 | return Err(PolicyMergeError::UnsupportedEndpointProtocol { |
| 694 | host: host.to_string(), |
| 695 | port, |
| 696 | protocol: endpoint.protocol.clone(), |
| 697 | }); |
| 698 | } |
| 699 | Ok(()) |
| 700 | } |
| 701 | |
| 702 | fn expand_existing_access( |
| 703 | endpoint: &mut NetworkEndpoint, |
no test coverage detected