(parsedTarget *url.URL)
| 269 | const metadataExchangeKey = "x-envoy-peer-metadata" |
| 270 | |
| 271 | func determineTargetCSM(parsedTarget *url.URL) bool { |
| 272 | // On the client-side, the channel target is used to determine if a channel is a |
| 273 | // CSM channel or not. CSM channels need to have an “xds” scheme and a |
| 274 | // "traffic-director-global.xds.googleapis.com" authority. In the cases where no |
| 275 | // authority is mentioned, the authority is assumed to be CSM. MetadataExchange |
| 276 | // is performed only for CSM channels. Non-metadata exchange labels are detected |
| 277 | // as described below. |
| 278 | return parsedTarget.Scheme == "xds" && (parsedTarget.Host == "" || parsedTarget.Host == "traffic-director-global.xds.googleapis.com") |
| 279 | } |
no outgoing calls