MCPcopy
hub / github.com/docker/docker-py / __init__

Method __init__

docker/transport/unixconn.py:52–64  ·  view source on GitHub ↗
(self, socket_url, timeout=60,
                 pool_connections=constants.DEFAULT_NUM_POOLS,
                 max_pool_size=constants.DEFAULT_MAX_POOL_SIZE)

Source from the content-addressed store, hash-verified

50 'max_pool_size']
51
52 def __init__(self, socket_url, timeout=60,
53 pool_connections=constants.DEFAULT_NUM_POOLS,
54 max_pool_size=constants.DEFAULT_MAX_POOL_SIZE):
55 socket_path = socket_url.replace('http+unix://', '')
56 if not socket_path.startswith('/'):
57 socket_path = f"/{socket_path}"
58 self.socket_path = socket_path
59 self.timeout = timeout
60 self.max_pool_size = max_pool_size
61 self.pools = RecentlyUsedContainer(
62 pool_connections, dispose_func=lambda p: p.close()
63 )
64 super().__init__()
65
66 def get_connection(self, url, proxies=None):
67 with self.pools.lock:

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected