Here are the examples of the python api twirrdy.protocol.RRDCacheClient taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
3
Example 1
def open(self, address, pidfile=None):
"""Open connection to rrdcached
@param address: path to rrdcached's UNIX socket
@type address: str
@param pidfile: optionally check rrdcached's pid file
@type pidfile: str
"""
deferred = defer.Deferred()
self._client = protocol.RRDCacheClient(deferred)
reactor.connectUNIX(address, self._client, checkPID=pidfile)
self.update = self._update_cache
return deferred
3
Example 2
def setUp(self):
sock = self.mktemp()
serverfactory = DummyCacheServer()
self.server = reactor.listenUNIX(sock, serverfactory)
deferred = defer.Deferred()
self.client = protocol.RRDCacheClient(deferred, True)
reactor.connectUNIX(sock, self.client)
return deferred