示例#1
0
    def config_get(self, parameter='*'):
        """Get the value of a configuration parameter(s).

        If called without argument will return all parameters.

        :raises TypeError: if parameter is not string
        """
        if not isinstance(parameter, str):
            raise TypeError("parameter must be str")
        fut = self.execute(b'CONFIG', b'GET', parameter, encoding='utf-8')
        return wait_make_dict(fut)
示例#2
0
文件: server.py 项目: cpwr/aioredis
    def config_get(self, parameter='*'):
        """Get the value of a configuration parameter(s).

        If called without argument will return all parameters.

        :raises TypeError: if parameter is not string
        """
        if not isinstance(parameter, str):
            raise TypeError("parameter must be str")
        fut = self.execute(b'CONFIG', b'GET', parameter, encoding='utf-8')
        return wait_make_dict(fut)
示例#3
0
 def xinfo_stream(self, stream):
     """Retrieve information about the given stream."""
     fut = self.execute(b"XINFO", b"STREAM", stream)
     return wait_make_dict(fut)
示例#4
0
文件: pubsub.py 项目: mindis/aioredis
 def pubsub_numsub(self, *channels):
     """Returns the number of subscribers for the specified channels."""
     return wait_make_dict(self._conn.execute(
         b'PUBSUB', b'NUMSUB', *channels))
示例#5
0
 def config_get(self, parameter):
     """Get the value of a configuration parameter."""
     if not isinstance(parameter, str):
         raise TypeError("parameter must be str")
     fut = self._conn.execute(b'CONFIG', b'GET', parameter)
     return wait_make_dict(fut)
示例#6
0
 def xinfo_stream(self, stream):
     """Retrieve information about the given stream."""
     fut = self.execute(b'XINFO', b'STREAM', stream)
     return wait_make_dict(fut)
示例#7
0
 def hgetall(self, key, *, encoding=_NOTSET):
     """Get all the fields and values in a hash."""
     fut = self._conn.execute(b'HGETALL', key, encoding=encoding)
     return wait_make_dict(fut)
示例#8
0
文件: hash.py 项目: aviramha/aioredis
 def hgetall(self, key, *, encoding=_NOTSET):
     """Get all the fields and values in a hash."""
     fut = self.execute(b"HGETALL", key, encoding=encoding)
     return wait_make_dict(fut)
示例#9
0
 def config_get(self, parameter):
     """Get the value of a configuration parameter."""
     if not isinstance(parameter, str):
         raise TypeError("parameter must be str")
     fut = self._conn.execute(b'CONFIG', b'GET', parameter)
     return wait_make_dict(fut)