本文整理汇总了Python中couchbase._libcouchbase.Connection.observe方法的典型用法代码示例。如果您正苦于以下问题:Python Connection.observe方法的具体用法?Python Connection.observe怎么用?Python Connection.observe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类couchbase._libcouchbase.Connection
的用法示例。
在下文中一共展示了Connection.observe方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: observe
# 需要导入模块: from couchbase._libcouchbase import Connection [as 别名]
# 或者: from couchbase._libcouchbase.Connection import observe [as 别名]
def observe(self, key):
"""
Return storage information for a key.
The ``observe`` function maps to the low-level ``OBSERVE``
command.
It returns a :class:`couchbase.result.ValueResult`
object with the ``value`` field
set to a list of :class:`~couchbase.result.ObserveInfo`
objects. Each element in the list
responds to the storage status for the key on the given node. The
length of the list (and thus the number of
:class:`~couchbase.result.ObserveInfo` objects)
are equal to the number of online replicas plus the master for the
given key.
:param string key: The key to inspect
.. seealso:: :ref:`observe_info`
"""
return _Base.observe(self, key)