-
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: add clientconn.CanonicalTarget() to return the canonical target string #7006
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #7006 +/- ##
==========================================
+ Coverage 82.21% 82.51% +0.30%
==========================================
Files 296 296
Lines 31473 31467 -6
==========================================
+ Hits 25874 25964 +90
+ Misses 4531 4448 -83
+ Partials 1068 1055 -13
|
clientconn.go
Outdated
// | ||
// # Experimental | ||
// | ||
// Notice: This API is EXPERIMENTAL and may be changed or removed in a | ||
// later release. | ||
func (cc *ClientConn) Target() string { | ||
return cc.target | ||
} | ||
|
||
// CanonicalTarget returns the canonical target string of the ClientConn. | ||
// | ||
// # Experimental | ||
// | ||
// Notice: This API is EXPERIMENTAL and may be changed or removed in a later | ||
// release. |
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.
Let's delete these experimental labels. Target()
will always return the string passed to Dial
and CanonicalTarget
will always return the scheme://[authority]/[endpoint]
.
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.
Okay, Done.
This change does 3 things:
CanonicalTarget()
API that returns canonical target stringRELEASE NOTES: