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
Informer gen keyfuncs #2
base: master
Are you sure you want to change the base?
Conversation
e148e4b
to
9691028
Compare
Use variadic option function instead of struct handle defaulting of sharedIndexInformer.index add godocs
9691028
to
bd67f11
Compare
@@ -83,6 +85,8 @@ type NewInformerFunc func({{.clientSetPackage|raw}}, {{.timeDuration|raw}}) cach | |||
type SharedInformerFactory interface { | |||
Start(stopCh <-chan struct{}) | |||
InformerFor(obj {{.runtimeObject|raw}}, newFunc NewInformerFunc) {{.cacheSharedIndexInformer|raw}} | |||
ExtraIndexers() {{.cacheIndexers|raw}} | |||
KeyFunction() {{.cacheKeyFunc|raw}} |
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.
One comment from Jordan that I didn't mention before (sorry!) was trying to avoid needing to do this. We should see if we can adjust the default informer functions in some way so this isn't needed.
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.
think I addressed it. I added variadic options to the NewInformerFunc type. I was unable to find a case of someone defining their own implementation of that function so as long as we don't take out the redundant resyncPeriod all callsites should remain unbroken. I could also create a parallel implementation with a NewInformerFuncWithOptions
and InformerForWithOptions
but it seemed a little heavy considering most of that is internal generated code.
bd67f11
to
ea717b9
Compare
No description provided.