-
Notifications
You must be signed in to change notification settings - Fork 219
fix: resource cache interface for InformerEventSource #758
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
Conversation
@@ -56,8 +50,8 @@ protected void handleEvent(T value, ResourceID relatedResourceID) { | |||
} | |||
} | |||
|
|||
public Cache<ResourceID, T> getCache() { | |||
return cache; | |||
public Map<ResourceID, T> getCache() { |
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 think this is too restrictive… I think we should probably simplify ResourceCache
and return that instead maybe?
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.
Not sure if following, we return all the values, can it be less restrictive?
On the other hand the resource cache is now about K8S resource, and this class is dedicated to non k8s resources. So not sure if we should unify those. Those have totally different requirements. And approach how we are handling them.
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.
Or maybe just a very simple way.
Like having a simple interface with one method
getValue(ResourceID id)
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.
This will be addressed in a subsequent PR, let's merge this as-is for now.
@@ -56,8 +50,8 @@ protected void handleEvent(T value, ResourceID relatedResourceID) { | |||
} | |||
} | |||
|
|||
public Cache<ResourceID, T> getCache() { | |||
return cache; | |||
public Map<ResourceID, T> getCache() { |
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.
This will be addressed in a subsequent PR, let's merge this as-is for now.
No description provided.