-
Notifications
You must be signed in to change notification settings - Fork 299
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
Watcher could implement either keep alive or retry mechanism #486
Comments
We need to build a higher level "Informer" on top of the Watcher to handle reconnecting after a watch stops. In general, you can't rely on a watch lasting forever. You have to List/Watch in a loop, but we should build a utility to make that easy for people to do correctly. |
@brendandburns does it mean this will be considered? Loop is exactly what I am doing now, so in case this would be already build in, it would be great. Use-cases for watch are usually long running tasks in my opinion. Observable would be even better as you can trigger delayed processing, buffering or throttling of events. |
We definitely should build up the Informer code. There are some starting points here: But it got hung up in the design phase. |
@petermicuch Would you be able to share your look example please? Edit, that's what I'm testing now:
|
You have to call
I have not compiled or tried this modified code, but should work. Also consider retrying on error with some delay. Would be nice if there is some kind of resilience implemented. If you want to know more, just check code of Watcher itself. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
close and move discuss to #533 |
Similar to issue mentioned here for python client, it would be really nice if Watcher does not drop connection after 30 minutes. Right now I am handling OnClose and OnError events and recreate Watcher after short period of time since connection was closed. Even better would be if watch supports Observable and one could use Rx to handle changes.
The text was updated successfully, but these errors were encountered: