kazoo.handlers.utils
Kazoo handler helpers
kazoo.handlers.utils.capture_exceptions(async_result)[source]¶ Return a new decorated function that propagates the exceptions of the wrapped function to an async_result. Parameters async_result – An async result implementing IAsyncResult kazoo.handlers.utils.wrap(async_result)[source]¶ Return a new decorated function that propagates the return value or exception of wrapped function to an async_result. NOTE: Only propagates a non-None return value. Parameters async_result – An async result implementing IAsyncResult
kazoo.handlers.utils.
capture_exceptions
Return a new decorated function that propagates the exceptions of the wrapped function to an async_result.
async_result – An async result implementing IAsyncResult
IAsyncResult
wrap
Return a new decorated function that propagates the return value or exception of wrapped function to an async_result. NOTE: Only propagates a non-None return value.
kazoo.handlers.utils.create_socket_pair(module, port=0)[source]¶ Create socket pair. If socket.socketpair isn’t available, we emulate it. kazoo.handlers.utils.create_tcp_socket(module)[source]¶ Create a TCP socket with the CLOEXEC flag set.
create_socket_pair
Create socket pair.
If socket.socketpair isn’t available, we emulate it.
create_tcp_socket
Create a TCP socket with the CLOEXEC flag set.
kazoo.handlers.threading
kazoo.interfaces