Package arvados :: Module keep :: Class KeepClient :: Class KeepService
[hide private]
[frames] | no frames]

Class KeepService

source code

builtins.object --+
                  |
                 KeepClient.KeepService

Make requests to a single Keep service, and track results.

A KeepService is intended to last long enough to perform one transaction (GET or PUT) against one Keep service. This can involve calling either get() or put() multiple times in order to retry after transient failures. However, calling both get() and put() on a single instance -- or using the same instance to access two different Keep services -- will not produce sensible behavior.

Instance Methods [hide private]
 
__init__(self, root, user_agent_pool=queue.LifoQueue(), upload_counter=None, download_counter=None, headers={}, insecure=False) source code
 
usable(self)
Is it worth attempting a request?
source code
 
finished(self)
Did the request succeed or encounter permanent failure?
source code
 
last_result(self) source code
 
_get_user_agent(self) source code
 
_put_user_agent(self, ua) source code
 
_socket_open(self, *args, **kwargs) source code
 
_socket_open_pycurl_7_19_3(self, family, socktype, protocol, address=None) source code
 
_socket_open_pycurl_7_21_5(self, purpose, address)
Because pycurl doesn't have CURLOPT_TCP_KEEPALIVE
source code
 
get(self, locator, method="GET", timeout=None) source code
 
put(self, hash_s, body, timeout=None) source code
 
_setcurltimeouts(self, curl, timeouts) source code
 
_headerfunction(self, header_line) source code
Class Variables [hide private]
  HTTP_ERRORS = socket.error, ssl.SSLError, arvados.errors.HttpE...
Class Variable Details [hide private]

HTTP_ERRORS

Value:
socket.error, ssl.SSLError, arvados.errors.HttpError,