@@ -40,7 +40,8 @@ class Client(
40
40
api .VolumeApiMixin ):
41
41
def __init__ (self , base_url = None , version = None ,
42
42
timeout = constants .DEFAULT_TIMEOUT_SECONDS , tls = False ,
43
- user_agent = constants .DEFAULT_USER_AGENT ):
43
+ user_agent = constants .DEFAULT_USER_AGENT ,
44
+ num_pools = constants .DEFAULT_NUM_POOLS ):
44
45
super (Client , self ).__init__ ()
45
46
46
47
if tls and not base_url :
@@ -58,7 +59,9 @@ def __init__(self, base_url=None, version=None,
58
59
base_url , constants .IS_WINDOWS_PLATFORM , tls = bool (tls )
59
60
)
60
61
if base_url .startswith ('http+unix://' ):
61
- self ._custom_adapter = UnixAdapter (base_url , timeout )
62
+ self ._custom_adapter = UnixAdapter (
63
+ base_url , timeout , num_pools = num_pools
64
+ )
62
65
self .mount ('http+docker://' , self ._custom_adapter )
63
66
self ._unmount ('http://' , 'https://' )
64
67
self .base_url = 'http+docker://localunixsocket'
@@ -68,7 +71,9 @@ def __init__(self, base_url=None, version=None,
68
71
'The npipe:// protocol is only supported on Windows'
69
72
)
70
73
try :
71
- self ._custom_adapter = NpipeAdapter (base_url , timeout )
74
+ self ._custom_adapter = NpipeAdapter (
75
+ base_url , timeout , num_pools = num_pools
76
+ )
72
77
except NameError :
73
78
raise errors .DockerException (
74
79
'Install pypiwin32 package to enable npipe:// support'
@@ -80,7 +85,9 @@ def __init__(self, base_url=None, version=None,
80
85
if isinstance (tls , TLSConfig ):
81
86
tls .configure_client (self )
82
87
elif tls :
83
- self ._custom_adapter = ssladapter .SSLAdapter ()
88
+ self ._custom_adapter = ssladapter .SSLAdapter (
89
+ num_pools = num_pools
90
+ )
84
91
self .mount ('https://' , self ._custom_adapter )
85
92
self .base_url = base_url
86
93
0 commit comments