-
Notifications
You must be signed in to change notification settings - Fork 4.6k
xds/internal:remove Generic resource Decoder and added concrete functions #8381 #8582
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
base: master
Are you sure you want to change the base?
xds/internal:remove Generic resource Decoder and added concrete functions #8381 #8582
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8582 +/- ##
==========================================
+ Coverage 81.98% 82.00% +0.02%
==========================================
Files 413 415 +2
Lines 40528 40738 +210
==========================================
+ Hits 33225 33407 +182
+ Misses 5944 5934 -10
- Partials 1359 1397 +38
🚀 New features to boost your workflow:
|
@vinothkumarr227 , can you please break this PR down into smaller PRs with one resource in one PR so that it is easier to understand and review. |
|
||
// LoadStore is the minimal interface returned by ReportLoad. It provides a | ||
// way to get per-cluster reporters and to stop the store. | ||
type LoadStore interface { |
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.
Why did we add this interface?
// balancer when LRS is enabled. Before that, all functions to record loads | ||
// are no-op. | ||
store *lrsclient.LoadStore | ||
perCluster *lrsclient.PerClusterReporter |
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.
Why did we change it to use the grpc xdsclient interfaces that we created?
// are are deserialized and validated, as received from the xDS management | ||
// server. Upon receipt of a response from the management server, an | ||
// appropriate callback on the watcher is invoked. | ||
func (c *clientImpl) WatchResource(rType xdsresource.Type, resourceName string, watcher xdsresource.ResourceWatcher) (cancel func()) { |
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.
If we are changing the type parameter, can we change it to a string so that the signatures match and we can directly call the xdsclient.WatchResource?
// interface with ref counting so that it can be shared by the xds resolver and | ||
// balancer implementations, across multiple ClientConns and Servers. | ||
type clientImpl struct { | ||
*xdsclient.XDSClient // TODO: #8313 - get rid of embedding, if possible. |
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.
Why did we make this change?
Fixes: #8381
RELEASE NOTES: