Add stream/stop support
Could you please add support for streaming events, so it's possible to watch for e.g. member updates?
Hi @wkornewald, I'd really like to get this added in, but I'm not sure what the most idiomatic way to get it working would look like.
What's your expectation in terms of how you'd like it to work? Something using gevent or twisted ? Or something else entirely?
Hi Kushal, I guess an asyncio version would be nice, but in general I was thinking of it being pretty transparent from the user's perspective:
Non-streaming calls would still work like they currently do (call a func, get return value).
Streaming events could simply be callback-based. You'd call a func to register the callback and get a return value which can be used to unregister the callback later.
For simplicity's sake, I'd probably use a separate connection in its own thread for each registered callback. No need to mess with demultiplexing responses (too complex, no practical advantage here).
I am not sure if this is the same request, but I would like to see support for serf's query command.
It would be nice to be able to send a query and receive all the replies from all members.