etcd3ref/client.py
def add_watch_callback(self, *args, **kwargs):
        """
        Watch a key or range of keys and call a callback on every response.

        If timeout was declared during the client initialization and
        the watch cannot be created during that time the method raises
        a ``WatchTimedOut`` exception.

        :param key: key to watch
        :param callback: callback function

        :returns: watch_id. Later it could be used for cancelling watch.
        """
        try:
            return self.watcher.add_callback(*args, **kwargs)
        except _InactiveRpcError as e:
            print("Exception {} happened, try to reconnect \n".format(e))
            self.reconnect()
            return self.watcher.add_callback(*args, **kwargs)
        except queue.Empty:
            raise exceptions.WatchTimedOut()

        Watch a key or range of keys and call a callback on every response.

        If timeout was declared during the client initialization and
        the watch cannot be created during that time the method raises
        a ``WatchTimedOut`` exception.

        :param key: key to watch
        :param callback: callback function

        :returns: watch_id. Later it could be used for cancelling watch.
        
Watch a key or range of keys and call a callback on every response.
If timeout was declared during the client initialization and
the watch cannot be created during that time the method raises
a ``WatchTimedOut`` exception.
Watch a key or range of keys and call a callback on every response . If timeout was declared during the client initialization and the watch cannot be created during that time the method raises a ` ` WatchTimedOut ` ` exception .
def add_watch_callback(self, *args, **kwargs):
        try:
            return self.watcher.add_callback(*args, **kwargs)
        except _InactiveRpcError as e:
            print("Exception {} happened, try to reconnect \n".format(e))
            self.reconnect()
            return self.watcher.add_callback(*args, **kwargs)
        except queue.Empty:
            raise exceptions.WatchTimedOut()
def add_watch_callback ( self , * args , ** kwargs ) : try : return self . watcher . add_callback ( * args , ** kwargs ) except _InactiveRpcError as e : print ( "Exception {} happened, try to reconnect \n" . format ( e ) ) self . reconnect ( ) return self . watcher . add_callback ( * args , ** kwargs ) except queue . Empty : raise exceptions . WatchTimedOut ( )
Watch a key or range of keys and call a callback on every response.
Watch a key or range of keys and call a callback on every response .
"""
        Watch a key or range of keys and call a callback on every response.

        If timeout was declared during the client initialization and
        the watch cannot be created during that time the method raises
        a ``WatchTimedOut`` exception.

        :param key: key to watch
        :param callback: callback function

        :returns: watch_id. Later it could be used for cancelling watch.
        """
None
self
key
key to watch
key to watch
callback
None