Commit a961459
authored
fix: plumb mtls endpoint to TransportChannelProvider (#3673)
This PR plumbs the MTLS endpoint (separately from the resolved endpoint)
from the `EndpointContext` to the `InstantiatingGrpcChannelProvider`.
Why not just set the MTLS endpoint in `EndpointContext` if S2A can be
used?
- Although we can decide whether or not to try to use S2A in
`EndpointContext`, we could fail to use S2A in
`InstantiatingGrpcChannelProvider` (if autoconfig doesn't return an
address), in which case we fall back to using a TLS connection
- DirectPath supersedes S2A in `InstantiatingGrpcChannelProvider`, and
the decision to use DirectPath is made in
`InstantiatingGrpcChannelProvider`, not `EndpointContext`. We may decide
to use S2A in `EndpointContext`, but when we go to create the channel in
`InstantiatingGrpcChannelProvider`, we may find that we should be using
DirectPath, in which case we need to use the non-MTLS endpoint1 parent cd89916 commit a961459
File tree
6 files changed
+66
-10
lines changed- gax-java
- gax-grpc/src/main/java/com/google/api/gax/grpc
- gax
- src
- main/java/com/google/api/gax/rpc
- test/java/com/google/api/gax/rpc
6 files changed
+66
-10
lines changedLines changed: 36 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| |||
179 | 180 | | |
180 | 181 | | |
181 | 182 | | |
| 183 | + | |
182 | 184 | | |
183 | 185 | | |
184 | 186 | | |
| |||
258 | 260 | | |
259 | 261 | | |
260 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
261 | 269 | | |
262 | 270 | | |
263 | 271 | | |
| |||
272 | 280 | | |
273 | 281 | | |
274 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
275 | 299 | | |
276 | 300 | | |
277 | 301 | | |
| |||
666 | 690 | | |
667 | 691 | | |
668 | 692 | | |
669 | | - | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
670 | 696 | | |
671 | 697 | | |
672 | 698 | | |
| |||
819 | 845 | | |
820 | 846 | | |
821 | 847 | | |
| 848 | + | |
822 | 849 | | |
823 | 850 | | |
824 | 851 | | |
| |||
926 | 953 | | |
927 | 954 | | |
928 | 955 | | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
929 | 964 | | |
930 | 965 | | |
931 | 966 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
121 | 131 | | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
226 | 230 | | |
227 | 231 | | |
228 | 232 | | |
| |||
Lines changed: 0 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | 306 | | |
314 | 307 | | |
315 | 308 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
100 | 114 | | |
101 | 115 | | |
102 | 116 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | | - | |
| 377 | + | |
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
388 | | - | |
| 388 | + | |
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
| |||
0 commit comments