-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
examples/features/dualstack: Demonstrate Dual Stack functionality #8098
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8098 +/- ##
==========================================
- Coverage 82.29% 82.28% -0.01%
==========================================
Files 387 387
Lines 38967 38942 -25
==========================================
- Hits 32066 32044 -22
+ Misses 5586 5582 -4
- Partials 1315 1316 +1 |
Wanted to check with you if the example has to be consistent across languages (before starting to review this)? |
8eda9ca
to
aeabe41
Compare
Changed the PR. Added a new example that closely follows Java's example instead of changing the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo minor nits
|
||
The dualstack example uses a custom name resolver that provides both IPv4 and | ||
IPv6 localhost endpoints for each of 3 server instances. The client will first | ||
use the default name resolver and load balancers which will only connect tot he |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: s/tot he/ to the/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
1. `127.0.0.1:50050`: Listening only on the IPv4 loopback address. | ||
1. `[::1]:50051`: Listening only on the IPv6 loopback address. | ||
|
||
The server response will include the include their serving port and address type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete the spurious include here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
// Since the IPv6 address comes first in the resolver list, it will be | ||
// given higher priority. | ||
fmt.Sprintf("[::1]:%d", port1), | ||
// Server 1 is listening only on the IPv4 loopback address. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Server 2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the comment.
32dd9d0
to
b985581
Compare
This PR add an example to demonstrate the usage of endpoints. The example demonstrates how a channel chooses b/w IPv4 and IPv6 addresses while connecting to backends. This example closely follows the example in Java.
RELEASE NOTES: