-
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
codes: update docstring to indicate expected usage #6701
Conversation
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.
codes/codes.go
Outdated
// other code values. Behavior and interopability are implementation-specific | ||
// and not guaranteed. |
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.
Can you clarify the scope of the language of "behavior and interoperability" here? What is not guaranteed? Any permutation of languages with defined status codes? Only status codes undefined?
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.
Clarified.
codes/codes.go
Outdated
// A Code is an unsigned 32-bit error code as defined in the gRPC spec. | ||
// A Code is a status code according to the gRPC spec: | ||
// | ||
// https://github.com/grpc/grpc/blob/master/doc/statuscodes.md |
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.
Easwar made me switch urls to a certain format: https://github.com/grpc/grpc-go/blob/master/xds/internal/balancer/wrrlocality/balancer.go#L19 (I think this is a strong heuristic of .go files). Can you please switch this?
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.
Done
Related to grpc/grpc#34588; specifically document that users should use ONLY the values defined by us.
RELEASE NOTES:
codes.Code