-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
auth, etcdserver: follow the correct usage of context #8901
Conversation
auth/store.go
Outdated
@@ -81,6 +81,10 @@ type AuthInfo struct { | |||
Revision uint64 | |||
} | |||
|
|||
// they are used for the keys of context in the parameters of Authenticate() | |||
type AuthenticateParamIndex struct{} |
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.
The keys of context shouldn't be string. They should be a struct of their own type. Fix etcd-io#8826
@gyuho thanks for merging |
Codecov Report
@@ Coverage Diff @@
## master #8901 +/- ##
==========================================
- Coverage 76.17% 76.05% -0.12%
==========================================
Files 359 359
Lines 29740 29740
==========================================
- Hits 22653 22620 -33
- Misses 5509 5537 +28
- Partials 1578 1583 +5
Continue to review full report at Codecov.
|
Changed TraceKey/StartTimeKey/TokenFieldNameGRPCKey to struct{} to follow the correct usage of context. Similar patch to etcd-io#8901. Signed-off-by: Wei Fu <fuweid89@gmail.com>
Changed TraceKey/StartTimeKey/TokenFieldNameGRPCKey to struct{} to follow the correct usage of context. Similar patch to etcd-io#8901. Signed-off-by: Wei Fu <fuweid89@gmail.com>
The keys of context shouldn't be string. They should be a struct of
their own type.
Fix #8826
/cc @gyuho