Parse the `tls` field from an endpoint config, independent of L7 protocol. Used to check for `tls: skip` even on L4-only endpoints (no `protocol` field) that explicitly opt out of TLS auto-detection.
(val: ®orus::Value)
| 298 | /// Used to check for `tls: skip` even on L4-only endpoints (no `protocol` |
| 299 | /// field) that explicitly opt out of TLS auto-detection. |
| 300 | pub fn parse_tls_mode(val: ®orus::Value) -> TlsMode { |
| 301 | match get_object_str(val, "tls").as_deref() { |
| 302 | Some("skip") => TlsMode::Skip, |
| 303 | // "terminate" and "passthrough" are deprecated aliases (logged by parse_l7_config); fall through to Auto. |
| 304 | _ => TlsMode::Auto, |
| 305 | } |
| 306 | } |
| 307 | |
| 308 | /// Extract a bool value from a regorus object. Returns `None` when the key |
| 309 | /// is absent or not a boolean. |
no test coverage detected