kubernetes/pkg/controller/replication
Alexander Zielenski 7436af3302
support removal of event handlers from SharedIndexInformers
To be able to implement controllers that are dynamically deciding
on which resources to watch, it is required to get rid of
dedicated watches and event handlers again. This requires the
possibility to remove event handlers from SharedIndexInformers again.
Stopping an informer is not sufficient, because there might
be multiple controllers in a controller manager that independently
decide which resources to watch.

Unfortunately the ResourceEventHandler interface encourages to use
value objects for handlers (like the ResourceEventHandlerFuncs
struct, that uses value receivers to implement the interface).
Go does not support comparison of function pointers and therefore
the comparison of such structs is not possible, also. To be able
to remove all kinds of handlers and to solve the problem of
multi-registrations of handlers a registration handle is introduced.
It is returned when adding a handler and can later be used to remove
the registration again. This handle directly stores the created
listener to simplify the deletion.
2022-08-08 14:01:09 -07:00
..
config OWNERS cleanup - Jan 2021 Week 1 2022-01-10 08:14:29 -05:00
conversion.go support removal of event handlers from SharedIndexInformers 2022-08-08 14:01:09 -07:00
doc.go
OWNERS Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
replication_controller_utils_test.go Deduplicate RC/RS controller code. 2017-11-07 14:48:32 -08:00
replication_controller_utils.go Deduplicate RC/RS controller code. 2017-11-07 14:48:32 -08:00
replication_controller.go Fix event broadcaster shutdown in multiple controllers 2022-05-17 22:14:19 +02:00