-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
grpc: clean up doc strings and some code around Dial vs NewClient #7029
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #7029 +/- ##
==========================================
- Coverage 82.34% 82.33% -0.02%
==========================================
Files 296 296
Lines 31471 31475 +4
==========================================
Hits 25914 25914
- Misses 4491 4493 +2
- Partials 1066 1068 +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.
LGTM, just a minor nit
@@ -632,7 +632,7 @@ func withHealthCheckFunc(f internal.HealthChecker) DialOption { | |||
}) | |||
} | |||
|
|||
func defaultDialOptions(defScheme string) dialOptions { | |||
func defaultDialOptions() dialOptions { |
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: There is only one usage of defaultDialOptions()
which is in NewClient
. How do you feel about putting this inline for more readability?
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.
I didn't make this, but I'd prefer to keep it like this. Having a separate function next to the struct like this makes it easy to find the default values. 🤷
- [X] Read the [Contributing document](../blob/-/.github/CONTRIBUTING.md). Summary --------------- Context: Context: grpc/grpc-go#7029 Wait for status changed and return when connection is connected. Since DialContext has been removed, it's a bit unclear what needed to happen for connection to be ready for use. This code will bring back partial implementation of DialContext so that connection is ready. Backward Compatibility --------------- Breaking Change? **No**
- [X] Read the [Contributing document](../blob/-/.github/CONTRIBUTING.md). Summary --------------- Context: Context: grpc/grpc-go#7029 Wait for status changed and return when connection is connected. Since DialContext has been removed, it's a bit unclear what needed to happen for connection to be ready for use. This code will bring back partial implementation of DialContext so that connection is ready. Backward Compatibility --------------- Breaking Change? **No**
Also added a test and removed an unused parameter from a function and call sites. (The reason it was needed in the past is to auto-detect the gRPCLB LB policy, which is functionality we no longer support.)
RELEASE NOTES: none