Description
Currently the event sources are already aware when a custom resource is delete, we have a callback which is currently called for example for TimerEventSource
, to cleanup all the timed events for the resource if it's not exists anymore.
Similar situation could happen for polling event source: #651
Where in the variant where we would poll separately for each custom resource the event source should be aware of the lifecycle events of a custom resource. Mainly if a custom resource is created and deleted. So the used don't have to pass the custom resource all the time to the polling event source what he wants to poll.
So a feature where an event source could implement CustomResourceEventAware
interface where it could receive events for the custom resource like if created
,deleted
and updated
arrived.
So for example when a new custom resource appeared the polling custom resource could poll from that point.
see also: #666
(This is an additive API change not necessarily needs to be in v2 first release)