Source code for zoonado.protocol.watches

from __future__ import unicode_literals

from .request import Request
from .response import Response
from .primitives import Int, Long, Vector, UString


WATCH_XID = -1


[docs]class WatchEvent(Response): """ """ CREATED = 1 DELETED = 2 DATA_CHANGED = 3 CHILDREN_CHANGED = 4 DISCONNECTED = 0 CONNECTED = 3 AUTH_FAILED = 4 CONNECTED_READ_ONLY = 5 SASL_AUTHENTICATED = 6 SESSION_EXPIRED = -112 parts = ( ("type", Int), ("state", Int), ("path", UString), )
[docs]class SetWatchesRequest(Request): """ """ opcode = 101 parts = ( ("relative_zxid", Long), ("data_watches", Vector.of(UString)), ("exist_watches", Vector.of(UString)), ("child_watches", Vector.of(UString)), )
[docs]class SetWatchesResponse(Response): """ """ opcode = 101 parts = ()
[docs]class CheckWatchesRequest(Request): """ """ opcode = 17 parts = ( ("path", UString), ("type", Int), )
[docs]class CheckWatchesResponse(Response): """ """ opcode = 17 parts = ()
[docs]class RemoveWatchesRequest(Request): """ """ opcode = 18 parts = ( ("path", UString), ("type", Int), )
[docs]class RemoveWatchesResponse(Response): """ """ opcode = 18 parts = ()