-
Notifications
You must be signed in to change notification settings - Fork 16
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
EVEREST-107 remove dead code #1047
base: main
Are you sure you want to change the base?
Conversation
recharte
commented
Jan 23, 2025
•
edited by jira
bot
Loading
edited by jira
bot
pkg/kubernetes/informer/informer.go
Outdated
// OnAdd is triggered when an object is added. | ||
func (i *Informer) OnAdd(cb func(obj interface{})) { | ||
i.eventHandlers.AddFunc = cb | ||
} | ||
|
||
// OnDelete is triggered when an object is deleted. | ||
func (i *Informer) OnDelete(cb func(obj interface{})) { | ||
i.eventHandlers.DeleteFunc = cb | ||
} | ||
|
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 would actually not remove this, they are a part of the Informer
utility. We are currently using only OnUpdate
for reloading the RBAC configMap, but it is possible to use OnAdd
and onDelete
too for other use-cases.
What I mean is this is a generic helper library to watch Kubernetes events and perform actions, so without these 2 methods, the library is kind of incomplete even though we aren't using it anywhere 😅
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.
Restored