Commit 74b5f60
authored
feat: Allow reuse http client in rest catalog (#1221)
## Which issue does this PR close?
Creating a reqwest client is not without cost; it involves DNS caching,
HTTP connection pooling, and TLS certificate loading. The previous
design also made it difficult for users to configure the HTTP client,
such as setting custom timeout values or using a globally shared DNS
resolver.
This PR addressed this by allowing users to create the client and pass
to rest catalog as config.
## What changes are included in this PR?
Allow users to pass a `reqwest::Client` as config.
## Are these changes tested?
Unit tests
Signed-off-by: Xuanwo <[email protected]>1 parent bc92f27 commit 74b5f60
2 files changed
+22
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| |||
106 | 109 | | |
107 | 110 | | |
108 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
109 | 117 | | |
110 | 118 | | |
111 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
64 | | - | |
| 62 | + | |
65 | 63 | | |
66 | 64 | | |
67 | 65 | | |
| |||
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
83 | | - | |
84 | | - | |
85 | | - | |
| 81 | + | |
86 | 82 | | |
87 | 83 | | |
88 | 84 | | |
| |||
162 | 158 | | |
163 | 159 | | |
164 | 160 | | |
165 | | - | |
166 | 161 | | |
167 | 162 | | |
168 | 163 | | |
169 | 164 | | |
170 | | - | |
| 165 | + | |
171 | 166 | | |
172 | 167 | | |
173 | 168 | | |
| |||
220 | 215 | | |
221 | 216 | | |
222 | 217 | | |
223 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
224 | 227 | | |
225 | 228 | | |
226 | 229 | | |
227 | 230 | | |
228 | 231 | | |
229 | 232 | | |
230 | | - | |
| 233 | + | |
231 | 234 | | |
232 | 235 | | |
233 | 236 | | |
| |||
0 commit comments