opendal 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (656) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -1
  3. data/Cargo.lock +3448 -0
  4. data/Cargo.toml +1 -1
  5. data/DEPENDENCIES.rust.tsv +31 -31
  6. data/README.md +4 -1
  7. data/Rakefile +0 -7
  8. data/core/CHANGELOG.md +80 -0
  9. data/core/Cargo.lock +495 -599
  10. data/core/Cargo.toml +98 -95
  11. data/core/DEPENDENCIES.rust.tsv +319 -324
  12. data/core/NOTICE +5 -0
  13. data/core/README.md +11 -6
  14. data/core/benches/vs_fs/Cargo.toml +1 -1
  15. data/core/benches/vs_s3/Cargo.toml +1 -1
  16. data/core/core/Cargo.toml +2 -2
  17. data/core/core/LICENSE +201 -0
  18. data/core/core/NOTICE +5 -0
  19. data/core/core/README.md +93 -0
  20. data/core/core/src/blocking/delete.rs +2 -2
  21. data/core/core/src/blocking/list.rs +2 -1
  22. data/core/core/src/blocking/operator.rs +10 -5
  23. data/core/core/src/blocking/read/std_bytes_iterator.rs +2 -1
  24. data/core/core/src/blocking/read/std_reader.rs +2 -1
  25. data/core/core/src/blocking/write/std_writer.rs +1 -1
  26. data/core/core/src/docs/performance/http_optimization.md +9 -1
  27. data/core/core/src/docs/rfcs/7749_http_transporter.md +9 -5
  28. data/core/core/src/layers/mod.rs +6 -1
  29. data/core/core/src/lib.rs +2 -137
  30. data/core/core/src/raw/accessor.rs +23 -21
  31. data/core/core/src/raw/oio/buf/queue_buf.rs +4 -2
  32. data/core/core/src/raw/oio/write/block_write.rs +3 -2
  33. data/core/core/src/raw/operation.rs +5 -5
  34. data/core/core/src/raw/ops.rs +85 -63
  35. data/core/core/src/raw/std_io_util.rs +33 -1
  36. data/core/core/src/services/memory/backend.rs +0 -1
  37. data/core/core/src/services/memory/mod.rs +6 -2
  38. data/core/core/src/services/mod.rs +8 -2
  39. data/core/core/src/types/buffer.rs +4 -4
  40. data/core/core/src/types/builder.rs +15 -17
  41. data/core/core/src/types/copy.rs +3 -3
  42. data/core/core/src/types/entry.rs +3 -1
  43. data/core/core/src/types/error.rs +16 -11
  44. data/core/core/src/types/execute/executors/mod.rs +3 -3
  45. data/core/core/src/types/http_transport/mod.rs +6 -0
  46. data/core/core/src/types/list.rs +5 -6
  47. data/core/core/src/types/operator/info.rs +6 -4
  48. data/core/core/src/types/operator/mod.rs +1 -1
  49. data/core/core/src/types/operator/operator.rs +42 -8
  50. data/core/core/src/types/operator/operator_futures.rs +36 -38
  51. data/core/core/src/types/operator/registry.rs +73 -14
  52. data/core/core/src/types/options.rs +48 -42
  53. data/core/core/src/types/read/reader.rs +2 -1
  54. data/core/core/src/types/write/writer.rs +2 -1
  55. data/core/http-transports/reqwest/Cargo.toml +2 -1
  56. data/core/http-transports/reqwest/LICENSE +201 -0
  57. data/core/http-transports/reqwest/NOTICE +5 -0
  58. data/core/http-transports/reqwest/README.md +37 -9
  59. data/core/http-transports/reqwest/src/lib.rs +30 -51
  60. data/core/layers/async-backtrace/Cargo.toml +3 -2
  61. data/core/layers/async-backtrace/LICENSE +201 -0
  62. data/core/layers/async-backtrace/NOTICE +5 -0
  63. data/core/layers/async-backtrace/README.md +48 -0
  64. data/core/layers/async-backtrace/src/lib.rs +5 -5
  65. data/core/layers/await-tree/Cargo.toml +3 -2
  66. data/core/layers/await-tree/LICENSE +201 -0
  67. data/core/layers/await-tree/NOTICE +5 -0
  68. data/core/layers/await-tree/README.md +48 -0
  69. data/core/layers/await-tree/src/lib.rs +5 -6
  70. data/core/layers/capability-check/Cargo.toml +3 -2
  71. data/core/layers/capability-check/LICENSE +201 -0
  72. data/core/layers/capability-check/NOTICE +5 -0
  73. data/core/layers/capability-check/README.md +48 -0
  74. data/core/layers/capability-check/src/lib.rs +7 -8
  75. data/core/layers/chaos/Cargo.toml +3 -2
  76. data/core/layers/chaos/LICENSE +201 -0
  77. data/core/layers/chaos/NOTICE +5 -0
  78. data/core/layers/chaos/README.md +47 -0
  79. data/core/layers/chaos/src/lib.rs +6 -7
  80. data/core/layers/concurrent-limit/Cargo.toml +3 -2
  81. data/core/layers/concurrent-limit/LICENSE +201 -0
  82. data/core/layers/concurrent-limit/NOTICE +5 -0
  83. data/core/layers/concurrent-limit/README.md +48 -0
  84. data/core/layers/concurrent-limit/src/lib.rs +8 -14
  85. data/core/layers/dtrace/Cargo.toml +3 -2
  86. data/core/layers/dtrace/LICENSE +201 -0
  87. data/core/layers/dtrace/NOTICE +5 -0
  88. data/core/layers/dtrace/README.md +52 -0
  89. data/core/layers/dtrace/src/lib.rs +5 -5
  90. data/core/layers/fastmetrics/Cargo.toml +4 -3
  91. data/core/layers/fastmetrics/LICENSE +201 -0
  92. data/core/layers/fastmetrics/NOTICE +5 -0
  93. data/core/layers/fastmetrics/README.md +47 -0
  94. data/core/layers/fastmetrics/src/lib.rs +4 -4
  95. data/core/layers/fastrace/Cargo.toml +3 -2
  96. data/core/layers/fastrace/LICENSE +201 -0
  97. data/core/layers/fastrace/NOTICE +5 -0
  98. data/core/layers/fastrace/README.md +47 -0
  99. data/core/layers/fastrace/src/lib.rs +5 -5
  100. data/core/layers/foyer/Cargo.toml +3 -2
  101. data/core/layers/foyer/LICENSE +201 -0
  102. data/core/layers/foyer/NOTICE +5 -0
  103. data/core/layers/foyer/README.md +47 -0
  104. data/core/layers/foyer/src/deleter.rs +1 -0
  105. data/core/layers/foyer/src/lib.rs +27 -10
  106. data/core/layers/foyer/src/writer.rs +1 -0
  107. data/core/layers/hotpath/Cargo.toml +4 -3
  108. data/core/layers/hotpath/LICENSE +201 -0
  109. data/core/layers/hotpath/NOTICE +5 -0
  110. data/core/layers/hotpath/README.md +47 -0
  111. data/core/layers/hotpath/src/lib.rs +4 -4
  112. data/core/layers/immutable-index/Cargo.toml +3 -2
  113. data/core/layers/immutable-index/LICENSE +201 -0
  114. data/core/layers/immutable-index/NOTICE +5 -0
  115. data/core/layers/immutable-index/README.md +48 -0
  116. data/core/layers/immutable-index/src/lib.rs +3 -4
  117. data/core/layers/logging/Cargo.toml +3 -2
  118. data/core/layers/logging/LICENSE +201 -0
  119. data/core/layers/logging/NOTICE +5 -0
  120. data/core/layers/logging/README.md +47 -0
  121. data/core/layers/logging/src/lib.rs +11 -11
  122. data/core/layers/metrics/Cargo.toml +4 -3
  123. data/core/layers/metrics/LICENSE +201 -0
  124. data/core/layers/metrics/NOTICE +5 -0
  125. data/core/layers/metrics/README.md +47 -0
  126. data/core/layers/metrics/src/lib.rs +6 -6
  127. data/core/layers/mime-guess/Cargo.toml +3 -2
  128. data/core/layers/mime-guess/LICENSE +201 -0
  129. data/core/layers/mime-guess/NOTICE +5 -0
  130. data/core/layers/mime-guess/README.md +47 -0
  131. data/core/layers/mime-guess/src/lib.rs +13 -17
  132. data/core/layers/observe-metrics-common/Cargo.toml +2 -1
  133. data/core/layers/observe-metrics-common/LICENSE +201 -0
  134. data/core/layers/observe-metrics-common/NOTICE +5 -0
  135. data/core/layers/observe-metrics-common/README.md +27 -0
  136. data/core/layers/observe-metrics-common/src/lib.rs +15 -9
  137. data/core/layers/otelmetrics/Cargo.toml +4 -3
  138. data/core/layers/otelmetrics/LICENSE +201 -0
  139. data/core/layers/otelmetrics/NOTICE +5 -0
  140. data/core/layers/otelmetrics/README.md +47 -0
  141. data/core/layers/otelmetrics/src/lib.rs +4 -4
  142. data/core/layers/oteltrace/Cargo.toml +3 -2
  143. data/core/layers/oteltrace/LICENSE +201 -0
  144. data/core/layers/oteltrace/NOTICE +5 -0
  145. data/core/layers/oteltrace/README.md +48 -0
  146. data/core/layers/oteltrace/src/lib.rs +13 -4
  147. data/core/layers/prometheus/Cargo.toml +4 -3
  148. data/core/layers/prometheus/LICENSE +201 -0
  149. data/core/layers/prometheus/NOTICE +5 -0
  150. data/core/layers/prometheus/README.md +47 -0
  151. data/core/layers/prometheus/src/lib.rs +4 -4
  152. data/core/layers/prometheus-client/Cargo.toml +4 -3
  153. data/core/layers/prometheus-client/LICENSE +201 -0
  154. data/core/layers/prometheus-client/NOTICE +5 -0
  155. data/core/layers/prometheus-client/README.md +48 -0
  156. data/core/layers/prometheus-client/src/lib.rs +4 -4
  157. data/core/layers/retry/Cargo.toml +5 -4
  158. data/core/layers/retry/LICENSE +201 -0
  159. data/core/layers/retry/NOTICE +5 -0
  160. data/core/layers/retry/README.md +50 -0
  161. data/core/layers/retry/src/lib.rs +6 -7
  162. data/core/layers/route/Cargo.toml +4 -3
  163. data/core/layers/route/LICENSE +201 -0
  164. data/core/layers/route/NOTICE +5 -0
  165. data/core/layers/route/README.md +58 -0
  166. data/core/layers/route/src/lib.rs +39 -9
  167. data/core/layers/tail-cut/Cargo.toml +3 -2
  168. data/core/layers/tail-cut/LICENSE +201 -0
  169. data/core/layers/tail-cut/NOTICE +5 -0
  170. data/core/layers/tail-cut/README.md +47 -0
  171. data/core/layers/tail-cut/src/lib.rs +7 -9
  172. data/core/layers/throttle/Cargo.toml +3 -2
  173. data/core/layers/throttle/LICENSE +201 -0
  174. data/core/layers/throttle/NOTICE +5 -0
  175. data/core/layers/throttle/README.md +47 -0
  176. data/core/layers/throttle/src/lib.rs +5 -7
  177. data/core/layers/timeout/Cargo.toml +4 -3
  178. data/core/layers/timeout/LICENSE +201 -0
  179. data/core/layers/timeout/NOTICE +5 -0
  180. data/core/layers/timeout/README.md +50 -0
  181. data/core/layers/timeout/src/lib.rs +9 -10
  182. data/core/layers/tracing/Cargo.toml +3 -2
  183. data/core/layers/tracing/LICENSE +201 -0
  184. data/core/layers/tracing/NOTICE +5 -0
  185. data/core/layers/tracing/README.md +47 -0
  186. data/core/layers/tracing/src/lib.rs +4 -4
  187. data/core/services/aliyun-drive/Cargo.toml +2 -1
  188. data/core/services/aliyun-drive/LICENSE +201 -0
  189. data/core/services/aliyun-drive/NOTICE +5 -0
  190. data/core/services/aliyun-drive/README.md +56 -0
  191. data/core/services/aliyun-drive/src/backend.rs +2 -2
  192. data/core/services/aliyun-drive/src/docs.md +7 -9
  193. data/core/services/aliyun-drive/src/lib.rs +12 -2
  194. data/core/services/aliyun-drive/src/lister.rs +2 -2
  195. data/core/services/alluxio/Cargo.toml +2 -1
  196. data/core/services/alluxio/LICENSE +201 -0
  197. data/core/services/alluxio/NOTICE +5 -0
  198. data/core/services/alluxio/README.md +56 -0
  199. data/core/services/alluxio/src/backend.rs +3 -3
  200. data/core/services/alluxio/src/docs.md +7 -5
  201. data/core/services/alluxio/src/lib.rs +12 -2
  202. data/core/services/azblob/Cargo.toml +6 -5
  203. data/core/services/azblob/LICENSE +201 -0
  204. data/core/services/azblob/NOTICE +5 -0
  205. data/core/services/azblob/README.md +56 -0
  206. data/core/services/azblob/src/backend.rs +3 -3
  207. data/core/services/azblob/src/core.rs +3 -3
  208. data/core/services/azblob/src/docs.md +7 -9
  209. data/core/services/azblob/src/lib.rs +14 -2
  210. data/core/services/azdls/Cargo.toml +6 -5
  211. data/core/services/azdls/LICENSE +201 -0
  212. data/core/services/azdls/NOTICE +5 -0
  213. data/core/services/azdls/README.md +56 -0
  214. data/core/services/azdls/src/backend.rs +3 -3
  215. data/core/services/azdls/src/docs.md +7 -8
  216. data/core/services/azdls/src/lib.rs +12 -2
  217. data/core/services/azdls/src/lister.rs +1 -1
  218. data/core/services/azfile/Cargo.toml +6 -5
  219. data/core/services/azfile/LICENSE +201 -0
  220. data/core/services/azfile/NOTICE +5 -0
  221. data/core/services/azfile/README.md +56 -0
  222. data/core/services/azfile/src/backend.rs +2 -2
  223. data/core/services/azfile/src/docs.md +7 -8
  224. data/core/services/azfile/src/lib.rs +12 -2
  225. data/core/services/azure-common/Cargo.toml +2 -1
  226. data/core/services/azure-common/LICENSE +201 -0
  227. data/core/services/azure-common/NOTICE +5 -0
  228. data/core/services/azure-common/README.md +26 -0
  229. data/core/services/azure-common/src/lib.rs +2 -5
  230. data/core/services/b2/Cargo.toml +2 -1
  231. data/core/services/b2/LICENSE +201 -0
  232. data/core/services/b2/NOTICE +5 -0
  233. data/core/services/b2/README.md +56 -0
  234. data/core/services/b2/src/backend.rs +4 -4
  235. data/core/services/b2/src/docs.md +7 -8
  236. data/core/services/b2/src/lib.rs +9 -3
  237. data/core/services/cacache/Cargo.toml +2 -1
  238. data/core/services/cacache/LICENSE +201 -0
  239. data/core/services/cacache/NOTICE +5 -0
  240. data/core/services/cacache/README.md +56 -0
  241. data/core/services/cacache/src/backend.rs +0 -1
  242. data/core/services/cacache/src/docs.md +7 -4
  243. data/core/services/cacache/src/lib.rs +9 -4
  244. data/core/services/cloudflare-kv/Cargo.toml +2 -1
  245. data/core/services/cloudflare-kv/LICENSE +201 -0
  246. data/core/services/cloudflare-kv/NOTICE +5 -0
  247. data/core/services/cloudflare-kv/README.md +56 -0
  248. data/core/services/cloudflare-kv/src/backend.rs +0 -2
  249. data/core/services/cloudflare-kv/src/docs.md +7 -5
  250. data/core/services/cloudflare-kv/src/lib.rs +9 -3
  251. data/core/services/compfs/Cargo.toml +2 -1
  252. data/core/services/compfs/LICENSE +201 -0
  253. data/core/services/compfs/NOTICE +5 -0
  254. data/core/services/compfs/README.md +58 -0
  255. data/core/services/compfs/src/lib.rs +9 -3
  256. data/core/services/cos/Cargo.toml +5 -4
  257. data/core/services/cos/LICENSE +201 -0
  258. data/core/services/cos/NOTICE +5 -0
  259. data/core/services/cos/README.md +56 -0
  260. data/core/services/cos/src/backend.rs +4 -4
  261. data/core/services/cos/src/docs.md +7 -9
  262. data/core/services/cos/src/lib.rs +12 -2
  263. data/core/services/d1/Cargo.toml +2 -1
  264. data/core/services/d1/LICENSE +201 -0
  265. data/core/services/d1/NOTICE +5 -0
  266. data/core/services/d1/README.md +56 -0
  267. data/core/services/d1/src/docs.md +7 -8
  268. data/core/services/d1/src/lib.rs +9 -3
  269. data/core/services/dashmap/Cargo.toml +2 -1
  270. data/core/services/dashmap/LICENSE +201 -0
  271. data/core/services/dashmap/NOTICE +5 -0
  272. data/core/services/dashmap/README.md +56 -0
  273. data/core/services/dashmap/src/backend.rs +1 -2
  274. data/core/services/dashmap/src/docs.md +7 -4
  275. data/core/services/dashmap/src/lib.rs +9 -4
  276. data/core/services/dbfs/Cargo.toml +2 -1
  277. data/core/services/dbfs/LICENSE +201 -0
  278. data/core/services/dbfs/NOTICE +5 -0
  279. data/core/services/dbfs/README.md +56 -0
  280. data/core/services/dbfs/src/backend.rs +2 -2
  281. data/core/services/dbfs/src/core.rs +1 -1
  282. data/core/services/dbfs/src/docs.md +7 -6
  283. data/core/services/dbfs/src/lib.rs +9 -4
  284. data/core/services/dbfs/src/lister.rs +1 -1
  285. data/core/services/dropbox/Cargo.toml +2 -1
  286. data/core/services/dropbox/LICENSE +201 -0
  287. data/core/services/dropbox/NOTICE +5 -0
  288. data/core/services/dropbox/README.md +56 -0
  289. data/core/services/dropbox/src/docs.md +7 -4
  290. data/core/services/dropbox/src/lib.rs +9 -4
  291. data/core/services/etcd/Cargo.toml +2 -1
  292. data/core/services/etcd/LICENSE +201 -0
  293. data/core/services/etcd/NOTICE +5 -0
  294. data/core/services/etcd/README.md +56 -0
  295. data/core/services/etcd/src/docs.md +7 -10
  296. data/core/services/etcd/src/lib.rs +9 -4
  297. data/core/services/foundationdb/Cargo.toml +2 -1
  298. data/core/services/foundationdb/LICENSE +201 -0
  299. data/core/services/foundationdb/NOTICE +5 -0
  300. data/core/services/foundationdb/README.md +56 -0
  301. data/core/services/foundationdb/src/docs.md +7 -5
  302. data/core/services/foundationdb/src/lib.rs +9 -4
  303. data/core/services/foyer/Cargo.toml +4 -3
  304. data/core/services/foyer/LICENSE +201 -0
  305. data/core/services/foyer/NOTICE +5 -0
  306. data/core/services/foyer/README.md +57 -0
  307. data/core/services/foyer/src/backend.rs +1 -1
  308. data/core/services/foyer/src/docs.md +12 -1
  309. data/core/services/foyer/src/lib.rs +9 -11
  310. data/core/services/fs/Cargo.toml +2 -1
  311. data/core/services/fs/LICENSE +201 -0
  312. data/core/services/fs/NOTICE +5 -0
  313. data/core/services/fs/README.md +56 -0
  314. data/core/services/fs/src/backend.rs +1 -1
  315. data/core/services/fs/src/docs.md +7 -5
  316. data/core/services/fs/src/lib.rs +9 -3
  317. data/core/services/ftp/Cargo.toml +2 -1
  318. data/core/services/ftp/LICENSE +201 -0
  319. data/core/services/ftp/NOTICE +5 -0
  320. data/core/services/ftp/README.md +56 -0
  321. data/core/services/ftp/src/backend.rs +1 -1
  322. data/core/services/ftp/src/docs.md +7 -7
  323. data/core/services/ftp/src/lib.rs +12 -2
  324. data/core/services/ftp/src/lister.rs +1 -1
  325. data/core/services/gcs/Cargo.toml +5 -4
  326. data/core/services/gcs/LICENSE +201 -0
  327. data/core/services/gcs/NOTICE +5 -0
  328. data/core/services/gcs/README.md +56 -0
  329. data/core/services/gcs/src/core.rs +55 -1
  330. data/core/services/gcs/src/docs.md +7 -13
  331. data/core/services/gcs/src/lib.rs +9 -3
  332. data/core/services/gcs/src/writer.rs +5 -12
  333. data/core/services/gdrive/Cargo.toml +2 -1
  334. data/core/services/gdrive/LICENSE +201 -0
  335. data/core/services/gdrive/NOTICE +5 -0
  336. data/core/services/gdrive/README.md +56 -0
  337. data/core/services/gdrive/src/docs.md +8 -5
  338. data/core/services/gdrive/src/lib.rs +12 -2
  339. data/core/services/gdrive/src/lister.rs +6 -6
  340. data/core/services/ghac/Cargo.toml +5 -4
  341. data/core/services/ghac/LICENSE +201 -0
  342. data/core/services/ghac/NOTICE +5 -0
  343. data/core/services/ghac/README.md +56 -0
  344. data/core/services/ghac/src/docs.md +7 -4
  345. data/core/services/ghac/src/lib.rs +12 -2
  346. data/core/services/github/Cargo.toml +2 -1
  347. data/core/services/github/LICENSE +201 -0
  348. data/core/services/github/NOTICE +5 -0
  349. data/core/services/github/README.md +56 -0
  350. data/core/services/github/src/backend.rs +4 -4
  351. data/core/services/github/src/docs.md +7 -8
  352. data/core/services/github/src/lib.rs +12 -2
  353. data/core/services/goosefs/Cargo.toml +4 -3
  354. data/core/services/goosefs/LICENSE +201 -0
  355. data/core/services/goosefs/NOTICE +5 -0
  356. data/core/services/goosefs/README.md +56 -0
  357. data/core/services/goosefs/src/backend.rs +31 -12
  358. data/core/services/goosefs/src/config.rs +1 -1
  359. data/core/services/goosefs/src/core.rs +72 -25
  360. data/core/services/goosefs/src/docs.md +10 -10
  361. data/core/services/goosefs/src/lib.rs +12 -2
  362. data/core/services/goosefs/src/writer.rs +24 -20
  363. data/core/services/goosefs/tests/safe_conditional_put.rs +199 -0
  364. data/core/services/gridfs/Cargo.toml +2 -1
  365. data/core/services/gridfs/LICENSE +201 -0
  366. data/core/services/gridfs/NOTICE +5 -0
  367. data/core/services/gridfs/README.md +56 -0
  368. data/core/services/gridfs/src/docs.md +7 -6
  369. data/core/services/gridfs/src/lib.rs +9 -4
  370. data/core/services/hdfs/Cargo.toml +2 -1
  371. data/core/services/hdfs/LICENSE +201 -0
  372. data/core/services/hdfs/NOTICE +5 -0
  373. data/core/services/hdfs/README.md +58 -0
  374. data/core/services/hdfs/src/backend.rs +1 -1
  375. data/core/services/hdfs/src/docs.md +9 -9
  376. data/core/services/hdfs/src/lib.rs +12 -2
  377. data/core/services/hdfs-native/Cargo.toml +3 -2
  378. data/core/services/hdfs-native/LICENSE +201 -0
  379. data/core/services/hdfs-native/NOTICE +5 -0
  380. data/core/services/hdfs-native/README.md +56 -0
  381. data/core/services/hdfs-native/src/backend.rs +3 -2
  382. data/core/services/hdfs-native/src/docs.md +7 -4
  383. data/core/services/hdfs-native/src/lib.rs +12 -2
  384. data/core/services/hdfs-native/src/writer.rs +1 -1
  385. data/core/services/hf/Cargo.toml +3 -2
  386. data/core/services/hf/LICENSE +201 -0
  387. data/core/services/hf/NOTICE +5 -0
  388. data/core/services/hf/README.md +56 -0
  389. data/core/services/hf/src/backend.rs +11 -9
  390. data/core/services/hf/src/config.rs +1 -1
  391. data/core/services/hf/src/core.rs +12 -12
  392. data/core/services/hf/src/docs.md +11 -12
  393. data/core/services/hf/src/lib.rs +13 -3
  394. data/core/services/hf/src/lister.rs +1 -1
  395. data/core/services/http/Cargo.toml +4 -3
  396. data/core/services/http/LICENSE +201 -0
  397. data/core/services/http/NOTICE +5 -0
  398. data/core/services/http/README.md +56 -0
  399. data/core/services/http/src/backend.rs +1 -1
  400. data/core/services/http/src/docs.md +7 -5
  401. data/core/services/http/src/lib.rs +10 -4
  402. data/core/services/ipfs/Cargo.toml +2 -1
  403. data/core/services/ipfs/LICENSE +201 -0
  404. data/core/services/ipfs/NOTICE +5 -0
  405. data/core/services/ipfs/README.md +56 -0
  406. data/core/services/ipfs/src/backend.rs +2 -2
  407. data/core/services/ipfs/src/docs.md +7 -5
  408. data/core/services/ipfs/src/lib.rs +9 -3
  409. data/core/services/ipmfs/Cargo.toml +2 -1
  410. data/core/services/ipmfs/LICENSE +201 -0
  411. data/core/services/ipmfs/NOTICE +5 -0
  412. data/core/services/ipmfs/README.md +56 -0
  413. data/core/services/ipmfs/src/docs.md +10 -1
  414. data/core/services/ipmfs/src/lib.rs +12 -2
  415. data/core/services/ipmfs/src/lister.rs +2 -2
  416. data/core/services/koofr/Cargo.toml +2 -1
  417. data/core/services/koofr/LICENSE +201 -0
  418. data/core/services/koofr/NOTICE +5 -0
  419. data/core/services/koofr/README.md +56 -0
  420. data/core/services/koofr/src/backend.rs +4 -4
  421. data/core/services/koofr/src/docs.md +7 -7
  422. data/core/services/koofr/src/lib.rs +12 -2
  423. data/core/services/lakefs/Cargo.toml +2 -1
  424. data/core/services/lakefs/LICENSE +201 -0
  425. data/core/services/lakefs/NOTICE +5 -0
  426. data/core/services/lakefs/README.md +56 -0
  427. data/core/services/lakefs/src/backend.rs +5 -5
  428. data/core/services/lakefs/src/docs.md +7 -9
  429. data/core/services/lakefs/src/lib.rs +9 -4
  430. data/core/services/lakefs/src/lister.rs +1 -1
  431. data/core/services/memcached/Cargo.toml +3 -2
  432. data/core/services/memcached/LICENSE +201 -0
  433. data/core/services/memcached/NOTICE +5 -0
  434. data/core/services/memcached/README.md +56 -0
  435. data/core/services/memcached/src/docs.md +7 -8
  436. data/core/services/memcached/src/lib.rs +9 -4
  437. data/core/services/mini_moka/Cargo.toml +2 -1
  438. data/core/services/mini_moka/LICENSE +201 -0
  439. data/core/services/mini_moka/NOTICE +5 -0
  440. data/core/services/mini_moka/README.md +56 -0
  441. data/core/services/mini_moka/src/backend.rs +1 -1
  442. data/core/services/mini_moka/src/docs.md +10 -1
  443. data/core/services/mini_moka/src/lib.rs +9 -4
  444. data/core/services/moka/Cargo.toml +2 -1
  445. data/core/services/moka/LICENSE +201 -0
  446. data/core/services/moka/NOTICE +5 -0
  447. data/core/services/moka/README.md +56 -0
  448. data/core/services/moka/src/backend.rs +1 -2
  449. data/core/services/moka/src/docs.md +7 -7
  450. data/core/services/moka/src/lib.rs +9 -3
  451. data/core/services/mongodb/Cargo.toml +2 -1
  452. data/core/services/mongodb/LICENSE +201 -0
  453. data/core/services/mongodb/NOTICE +5 -0
  454. data/core/services/mongodb/README.md +56 -0
  455. data/core/services/mongodb/src/docs.md +7 -7
  456. data/core/services/mongodb/src/lib.rs +12 -2
  457. data/core/services/monoiofs/Cargo.toml +2 -1
  458. data/core/services/monoiofs/LICENSE +201 -0
  459. data/core/services/monoiofs/NOTICE +5 -0
  460. data/core/services/monoiofs/README.md +58 -0
  461. data/core/services/monoiofs/src/docs.md +7 -4
  462. data/core/services/monoiofs/src/lib.rs +9 -4
  463. data/core/services/mysql/Cargo.toml +2 -1
  464. data/core/services/mysql/LICENSE +201 -0
  465. data/core/services/mysql/NOTICE +5 -0
  466. data/core/services/mysql/README.md +56 -0
  467. data/core/services/mysql/src/docs.md +7 -6
  468. data/core/services/mysql/src/lib.rs +12 -2
  469. data/core/services/obs/Cargo.toml +5 -4
  470. data/core/services/obs/LICENSE +201 -0
  471. data/core/services/obs/NOTICE +5 -0
  472. data/core/services/obs/README.md +56 -0
  473. data/core/services/obs/src/backend.rs +4 -4
  474. data/core/services/obs/src/docs.md +7 -9
  475. data/core/services/obs/src/lib.rs +12 -2
  476. data/core/services/onedrive/Cargo.toml +2 -1
  477. data/core/services/onedrive/LICENSE +201 -0
  478. data/core/services/onedrive/NOTICE +5 -0
  479. data/core/services/onedrive/README.md +56 -0
  480. data/core/services/onedrive/src/docs.md +10 -10
  481. data/core/services/onedrive/src/lib.rs +9 -3
  482. data/core/services/opfs/Cargo.toml +4 -1
  483. data/core/services/opfs/LICENSE +201 -0
  484. data/core/services/opfs/NOTICE +5 -0
  485. data/core/services/opfs/README.md +63 -0
  486. data/core/services/opfs/src/core.rs +2 -0
  487. data/core/services/opfs/src/docs.md +7 -1
  488. data/core/services/opfs/src/lib.rs +11 -2
  489. data/core/services/oss/Cargo.toml +5 -4
  490. data/core/services/oss/LICENSE +201 -0
  491. data/core/services/oss/NOTICE +5 -0
  492. data/core/services/oss/README.md +56 -0
  493. data/core/services/oss/src/backend.rs +4 -4
  494. data/core/services/oss/src/docs.md +10 -22
  495. data/core/services/oss/src/lib.rs +9 -3
  496. data/core/services/pcloud/Cargo.toml +2 -1
  497. data/core/services/pcloud/LICENSE +201 -0
  498. data/core/services/pcloud/NOTICE +5 -0
  499. data/core/services/pcloud/README.md +56 -0
  500. data/core/services/pcloud/src/backend.rs +3 -3
  501. data/core/services/pcloud/src/docs.md +7 -7
  502. data/core/services/pcloud/src/lib.rs +9 -3
  503. data/core/services/persy/Cargo.toml +2 -1
  504. data/core/services/persy/LICENSE +201 -0
  505. data/core/services/persy/NOTICE +5 -0
  506. data/core/services/persy/README.md +56 -0
  507. data/core/services/persy/src/backend.rs +0 -1
  508. data/core/services/persy/src/docs.md +7 -6
  509. data/core/services/persy/src/lib.rs +9 -3
  510. data/core/services/postgresql/Cargo.toml +2 -1
  511. data/core/services/postgresql/LICENSE +201 -0
  512. data/core/services/postgresql/NOTICE +5 -0
  513. data/core/services/postgresql/README.md +56 -0
  514. data/core/services/postgresql/src/docs.md +7 -6
  515. data/core/services/postgresql/src/lib.rs +12 -2
  516. data/core/services/redb/Cargo.toml +2 -1
  517. data/core/services/redb/LICENSE +201 -0
  518. data/core/services/redb/NOTICE +5 -0
  519. data/core/services/redb/README.md +56 -0
  520. data/core/services/redb/src/backend.rs +0 -1
  521. data/core/services/redb/src/docs.md +7 -5
  522. data/core/services/redb/src/lib.rs +9 -3
  523. data/core/services/redis/Cargo.toml +2 -1
  524. data/core/services/redis/LICENSE +201 -0
  525. data/core/services/redis/NOTICE +5 -0
  526. data/core/services/redis/README.md +56 -0
  527. data/core/services/redis/src/docs.md +7 -9
  528. data/core/services/redis/src/lib.rs +9 -4
  529. data/core/services/rocksdb/Cargo.toml +2 -1
  530. data/core/services/rocksdb/LICENSE +201 -0
  531. data/core/services/rocksdb/NOTICE +5 -0
  532. data/core/services/rocksdb/README.md +56 -0
  533. data/core/services/rocksdb/src/backend.rs +0 -1
  534. data/core/services/rocksdb/src/docs.md +7 -5
  535. data/core/services/rocksdb/src/lib.rs +12 -2
  536. data/core/services/s3/Cargo.toml +5 -4
  537. data/core/services/s3/LICENSE +201 -0
  538. data/core/services/s3/NOTICE +5 -0
  539. data/core/services/s3/README.md +56 -0
  540. data/core/services/s3/src/backend.rs +60 -7
  541. data/core/services/s3/src/compatible_services.md +10 -2
  542. data/core/services/s3/src/core.rs +16 -8
  543. data/core/services/s3/src/docs.md +7 -28
  544. data/core/services/s3/src/lib.rs +9 -3
  545. data/core/services/seafile/Cargo.toml +2 -1
  546. data/core/services/seafile/LICENSE +201 -0
  547. data/core/services/seafile/NOTICE +5 -0
  548. data/core/services/seafile/README.md +56 -0
  549. data/core/services/seafile/src/backend.rs +3 -3
  550. data/core/services/seafile/src/docs.md +7 -8
  551. data/core/services/seafile/src/lib.rs +12 -2
  552. data/core/services/sftp/Cargo.toml +2 -1
  553. data/core/services/sftp/LICENSE +201 -0
  554. data/core/services/sftp/NOTICE +5 -0
  555. data/core/services/sftp/README.md +56 -0
  556. data/core/services/sftp/src/backend.rs +2 -2
  557. data/core/services/sftp/src/docs.md +7 -9
  558. data/core/services/sftp/src/lib.rs +9 -4
  559. data/core/services/sled/Cargo.toml +2 -1
  560. data/core/services/sled/LICENSE +201 -0
  561. data/core/services/sled/NOTICE +5 -0
  562. data/core/services/sled/README.md +56 -0
  563. data/core/services/sled/src/backend.rs +0 -1
  564. data/core/services/sled/src/docs.md +7 -4
  565. data/core/services/sled/src/lib.rs +12 -2
  566. data/core/services/sqlite/Cargo.toml +2 -1
  567. data/core/services/sqlite/LICENSE +201 -0
  568. data/core/services/sqlite/NOTICE +5 -0
  569. data/core/services/sqlite/README.md +56 -0
  570. data/core/services/sqlite/src/backend.rs +0 -1
  571. data/core/services/sqlite/src/docs.md +7 -6
  572. data/core/services/sqlite/src/lib.rs +12 -2
  573. data/core/services/surrealdb/Cargo.toml +2 -1
  574. data/core/services/surrealdb/LICENSE +201 -0
  575. data/core/services/surrealdb/NOTICE +5 -0
  576. data/core/services/surrealdb/README.md +56 -0
  577. data/core/services/surrealdb/src/docs.md +8 -10
  578. data/core/services/surrealdb/src/lib.rs +9 -3
  579. data/core/services/swift/Cargo.toml +2 -1
  580. data/core/services/swift/LICENSE +201 -0
  581. data/core/services/swift/NOTICE +5 -0
  582. data/core/services/swift/README.md +56 -0
  583. data/core/services/swift/src/backend.rs +2 -2
  584. data/core/services/swift/src/core.rs +24 -24
  585. data/core/services/swift/src/deleter.rs +1 -1
  586. data/core/services/swift/src/docs.md +7 -6
  587. data/core/services/swift/src/lib.rs +9 -4
  588. data/core/services/swift/src/writer.rs +1 -1
  589. data/core/services/tikv/Cargo.toml +2 -1
  590. data/core/services/tikv/LICENSE +201 -0
  591. data/core/services/tikv/NOTICE +5 -0
  592. data/core/services/tikv/README.md +56 -0
  593. data/core/services/tikv/src/backend.rs +1 -1
  594. data/core/services/tikv/src/docs.md +7 -8
  595. data/core/services/tikv/src/lib.rs +12 -2
  596. data/core/services/tos/Cargo.toml +5 -4
  597. data/core/services/tos/LICENSE +201 -0
  598. data/core/services/tos/NOTICE +5 -0
  599. data/core/services/tos/README.md +56 -0
  600. data/core/services/tos/src/docs.md +7 -10
  601. data/core/services/tos/src/lib.rs +9 -3
  602. data/core/services/upyun/Cargo.toml +2 -1
  603. data/core/services/upyun/LICENSE +201 -0
  604. data/core/services/upyun/NOTICE +5 -0
  605. data/core/services/upyun/README.md +56 -0
  606. data/core/services/upyun/src/backend.rs +3 -3
  607. data/core/services/upyun/src/docs.md +7 -7
  608. data/core/services/upyun/src/lib.rs +9 -4
  609. data/core/services/vercel-artifacts/Cargo.toml +2 -1
  610. data/core/services/vercel-artifacts/LICENSE +201 -0
  611. data/core/services/vercel-artifacts/NOTICE +5 -0
  612. data/core/services/vercel-artifacts/README.md +56 -0
  613. data/core/services/vercel-artifacts/src/docs.md +7 -7
  614. data/core/services/vercel-artifacts/src/lib.rs +11 -3
  615. data/core/services/vercel-blob/Cargo.toml +2 -1
  616. data/core/services/vercel-blob/LICENSE +201 -0
  617. data/core/services/vercel-blob/NOTICE +5 -0
  618. data/core/services/vercel-blob/README.md +56 -0
  619. data/core/services/vercel-blob/src/backend.rs +2 -2
  620. data/core/services/vercel-blob/src/docs.md +7 -5
  621. data/core/services/vercel-blob/src/lib.rs +12 -2
  622. data/core/services/webdav/Cargo.toml +2 -1
  623. data/core/services/webdav/LICENSE +201 -0
  624. data/core/services/webdav/NOTICE +5 -0
  625. data/core/services/webdav/README.md +56 -0
  626. data/core/services/webdav/src/backend.rs +1 -1
  627. data/core/services/webdav/src/docs.md +7 -7
  628. data/core/services/webdav/src/lib.rs +12 -2
  629. data/core/services/webhdfs/Cargo.toml +2 -1
  630. data/core/services/webhdfs/LICENSE +201 -0
  631. data/core/services/webhdfs/NOTICE +5 -0
  632. data/core/services/webhdfs/README.md +56 -0
  633. data/core/services/webhdfs/src/docs.md +11 -9
  634. data/core/services/webhdfs/src/lib.rs +12 -2
  635. data/core/services/yandex-disk/Cargo.toml +2 -1
  636. data/core/services/yandex-disk/LICENSE +201 -0
  637. data/core/services/yandex-disk/NOTICE +5 -0
  638. data/core/services/yandex-disk/README.md +56 -0
  639. data/core/services/yandex-disk/src/backend.rs +2 -2
  640. data/core/services/yandex-disk/src/docs.md +7 -5
  641. data/core/services/yandex-disk/src/lib.rs +9 -3
  642. data/core/src/lib.rs +30 -4
  643. data/core/testkit/Cargo.toml +5 -4
  644. data/core/testkit/LICENSE +201 -0
  645. data/core/testkit/NOTICE +5 -0
  646. data/core/testkit/README.md +25 -0
  647. data/core/testkit/src/lib.rs +4 -2
  648. data/core/testkit/src/read.rs +12 -13
  649. data/core/testkit/src/write.rs +12 -13
  650. data/core/tests/behavior/async_list.rs +2 -2
  651. data/core/tests/behavior/async_presign.rs +4 -4
  652. data/core/tests/behavior/async_stat.rs +1 -1
  653. data/core/tests/behavior/async_write.rs +1 -1
  654. data/core/users.md +2 -0
  655. data/opendal.gemspec +5 -1
  656. metadata +283 -2
@@ -60,18 +60,46 @@ Most users depend on the `opendal` facade crate:
60
60
  ```toml
61
61
  [dependencies]
62
62
  # Default: reqwest transport with rustls.
63
- opendal = { version = "0.57" }
63
+ opendal = { version = "0.58" }
64
64
  ```
65
65
 
66
66
  To select one transport TLS feature explicitly, disable default features:
67
67
 
68
68
  ```toml
69
69
  [dependencies]
70
- opendal = { version = "0.57", default-features = false, features = [
70
+ opendal = { version = "0.58", default-features = false, features = [
71
71
  "http-transport-reqwest-rustls",
72
72
  ] }
73
73
  ```
74
74
 
75
+ ## Use with `opendal-core`
76
+
77
+ Applications that use the split crates can attach reqwest to an operator
78
+ without installing a process-wide default transport:
79
+
80
+ ```shell
81
+ cargo add opendal-core opendal-http-transport-reqwest
82
+ ```
83
+
84
+ ```rust
85
+ use opendal_core::Builder;
86
+ use opendal_core::HttpTransporter;
87
+ use opendal_core::OperationContext;
88
+ use opendal_core::Operator;
89
+ use opendal_core::Result;
90
+ use opendal_http_transport_reqwest::ReqwestTransport;
91
+
92
+ fn build_operator<B: Builder>(builder: B) -> Result<Operator> {
93
+ let transport = HttpTransporter::new(ReqwestTransport::default());
94
+ let context = OperationContext::new().with_http_transport(transport);
95
+
96
+ Ok(Operator::new(builder)?.with_context(context))
97
+ }
98
+ ```
99
+
100
+ Pass a configured service builder to `build_operator`. The resulting operator
101
+ uses this reqwest transport for HTTP-backed services.
102
+
75
103
  ## Build different TLS backends
76
104
 
77
105
  ### Rustls
@@ -80,7 +108,7 @@ Use reqwest's Rustls backend explicitly when you build the client:
80
108
 
81
109
  ```toml
82
110
  [dependencies]
83
- opendal = { version = "0.57", default-features = false, features = [
111
+ opendal = { version = "0.58", default-features = false, features = [
84
112
  "http-transport-reqwest-rustls",
85
113
  ] }
86
114
  reqwest = { version = "0.13.4", default-features = false, features = [
@@ -89,7 +117,7 @@ reqwest = { version = "0.13.4", default-features = false, features = [
89
117
  ] }
90
118
  ```
91
119
 
92
- ```rust
120
+ ```rust,ignore
93
121
  use std::time::Duration;
94
122
 
95
123
  use opendal::HttpTransporter;
@@ -111,7 +139,7 @@ Use `native-tls` when you want reqwest to delegate TLS to the platform stack:
111
139
 
112
140
  ```toml
113
141
  [dependencies]
114
- opendal = { version = "0.57", default-features = false, features = [
142
+ opendal = { version = "0.58", default-features = false, features = [
115
143
  "http-transport-reqwest-native-tls",
116
144
  ] }
117
145
  reqwest = { version = "0.13.4", default-features = false, features = [
@@ -120,7 +148,7 @@ reqwest = { version = "0.13.4", default-features = false, features = [
120
148
  ] }
121
149
  ```
122
150
 
123
- ```rust
151
+ ```rust,ignore
124
152
  use opendal::HttpTransporter;
125
153
  use opendal::ReqwestTransport;
126
154
 
@@ -144,7 +172,7 @@ startup.
144
172
 
145
173
  ```toml
146
174
  [dependencies]
147
- opendal = { version = "0.57", default-features = false, features = [
175
+ opendal = { version = "0.58", default-features = false, features = [
148
176
  "http-transport-reqwest-rustls-no-provider",
149
177
  ] }
150
178
  reqwest = { version = "0.13.4", default-features = false, features = [
@@ -155,7 +183,7 @@ rustls = { version = "0.23", default-features = false, features = ["std"] }
155
183
  webpki-roots = "1"
156
184
  ```
157
185
 
158
- ```rust
186
+ ```rust,ignore
159
187
  use opendal::HttpTransporter;
160
188
  use opendal::ReqwestTransport;
161
189
 
@@ -191,6 +219,6 @@ for the target-specific limitations.
191
219
 
192
220
  ## License and Trademarks
193
221
 
194
- Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
222
+ Licensed under the Apache License, Version 2.0: <http://www.apache.org/licenses/LICENSE-2.0>
195
223
 
196
224
  Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.
@@ -15,55 +15,10 @@
15
15
  // specific language governing permissions and limitations
16
16
  // under the License.
17
17
 
18
- //! Reqwest based HTTP transport for Apache OpenDAL.
19
- //!
20
- //! # TLS backends
21
- //!
22
- //! Enable one of the following Cargo features to compile reqwest TLS support.
23
- //! The `default` feature enables `rustls`.
24
- //!
25
- //! - **`native-tls`** — Platform TLS links against the OS TLS library:
26
- //! - Windows: SChannel
27
- //! - macOS: Secure Transport
28
- //! - Linux: OpenSSL, requires system development packages
29
- //!
30
- //! - **`rustls`** — [Rustls](https://crates.io/crates/rustls) configured by
31
- //! reqwest with its default crypto provider and platform certificate
32
- //! verification. Pure-Rust TLS stack, no system TLS dependency.
33
- //!
34
- //! - **`rustls-no-provider`** — Rustls without a built-in crypto provider.
35
- //! You must install a [`rustls::crypto::CryptoProvider`] before building a
36
- //! client. Use this when you want to bring your own provider
37
- //! (e.g., a FIPS-certified module).
38
- //!
39
- //! In application or language binding builds, prefer selecting a single backend
40
- //! feature. In workspace or `--all-features` builds, Cargo may enable multiple
41
- //! backend features via feature unification; build a [`reqwest::Client`] with
42
- //! reqwest's TLS configuration methods and pass it to [`ReqwestTransport::new`]
43
- //! to force the backend you want.
44
- //!
45
- //! On wasm targets, reqwest uses the Fetch API instead of hyper. TLS is provided
46
- //! by the host environment, so native TLS backend features do not select a TLS
47
- //! stack there.
48
- //!
49
- //! # Custom reqwest client
50
- //!
51
- //! ```
52
- //! use std::time::Duration;
53
- //!
54
- //! use opendal_core::HttpTransporter;
55
- //! use opendal_http_transport_reqwest::ReqwestTransport;
56
- //!
57
- //! # fn build() -> Result<(), Box<dyn std::error::Error>> {
58
- //! let client = reqwest::Client::builder()
59
- //! .tls_backend_rustls()
60
- //! .connect_timeout(Duration::from_secs(10))
61
- //! .build()?;
62
- //! let transport = ReqwestTransport::new(client);
63
- //! let _transport = HttpTransporter::new(transport);
64
- //! # Ok(())
65
- //! # }
66
- //! ```
18
+ #![doc = include_str!("../README.md")]
19
+ #![cfg_attr(docsrs, feature(doc_cfg))]
20
+ #![cfg_attr(docsrs, doc(auto_cfg))]
21
+ #![deny(missing_docs)]
67
22
 
68
23
  use std::fmt::{Debug, Formatter};
69
24
  use std::future;
@@ -78,11 +33,13 @@ use opendal_core::Error;
78
33
  use opendal_core::ErrorKind;
79
34
  use opendal_core::HttpBody;
80
35
  use opendal_core::HttpTransport;
36
+ use opendal_core::HttpTransporter;
81
37
  use opendal_core::Result;
82
38
  use opendal_core::raw::parse_content_encoding;
83
39
  use opendal_core::raw::parse_content_length;
84
40
 
85
- static DEFAULT_REQWEST_CLIENT: LazyLock<reqwest::Client> = LazyLock::new(reqwest::Client::new);
41
+ static DEFAULT_REQWEST_TRANSPORT: LazyLock<ReqwestTransport> =
42
+ LazyLock::new(|| ReqwestTransport::new(reqwest::Client::new()));
86
43
 
87
44
  /// A HTTP transport with [`reqwest::Client`].
88
45
  #[derive(Clone)]
@@ -98,7 +55,7 @@ impl Debug for ReqwestTransport {
98
55
 
99
56
  impl Default for ReqwestTransport {
100
57
  fn default() -> Self {
101
- Self::new(DEFAULT_REQWEST_CLIENT.clone())
58
+ DEFAULT_REQWEST_TRANSPORT.clone()
102
59
  }
103
60
  }
104
61
 
@@ -206,6 +163,23 @@ impl HttpTransport for ReqwestTransport {
206
163
  }
207
164
  }
208
165
 
166
+ /// Install the process-wide default reqwest transport.
167
+ ///
168
+ /// The reqwest client is initialized when the transport handles its first
169
+ /// request.
170
+ #[doc(hidden)]
171
+ pub fn install_default() {
172
+ HttpTransporter::install_default(LazyReqwestTransport);
173
+ }
174
+
175
+ struct LazyReqwestTransport;
176
+
177
+ impl HttpTransport for LazyReqwestTransport {
178
+ async fn fetch(&self, req: Request<Buffer>) -> Result<Response<HttpBody>> {
179
+ DEFAULT_REQWEST_TRANSPORT.fetch(req).await
180
+ }
181
+ }
182
+
209
183
  #[inline]
210
184
  fn is_temporary_error(err: &reqwest::Error) -> bool {
211
185
  // error sending request
@@ -247,6 +221,11 @@ impl http_body::Body for HttpBufferBody {
247
221
  mod tests {
248
222
  use super::*;
249
223
 
224
+ #[test]
225
+ fn test_install_default_is_lazy() {
226
+ install_default();
227
+ }
228
+
250
229
  #[cfg(any(feature = "rustls", feature = "native-tls"))]
251
230
  #[test]
252
231
  fn test_default_transport_succeeds() {
@@ -18,6 +18,7 @@
18
18
  [package]
19
19
  description = "Apache OpenDAL async-backtrace layer"
20
20
  name = "opendal-layer-async-backtrace"
21
+ readme = "README.md"
21
22
 
22
23
  authors = { workspace = true }
23
24
  edition = { workspace = true }
@@ -32,7 +33,7 @@ all-features = true
32
33
 
33
34
  [dependencies]
34
35
  async-backtrace = "0.2.6"
35
- opendal-core = { path = "../../core", version = "0.58.0", default-features = false }
36
+ opendal-core = { path = "../../core", version = "0.58.1", default-features = false }
36
37
 
37
38
  [dev-dependencies]
38
- opendal-core = { path = "../../core", version = "0.58.0" }
39
+ opendal-core = { path = "../../core", version = "0.58.1" }
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,5 @@
1
+ Apache OpenDAL
2
+ Copyright 2023-2026 The Apache Software Foundation
3
+
4
+ This product includes software developed at
5
+ The Apache Software Foundation (http://www.apache.org/).
@@ -0,0 +1,48 @@
1
+ # Apache OpenDAL™ Async Backtrace Layer
2
+
3
+ `opendal-layer-async-backtrace` records logical stack traces for asynchronous service
4
+ operations with `async-backtrace`.
5
+
6
+ ## Use through `opendal`
7
+
8
+ Applications should normally enable this layer through the `opendal` facade with the
9
+ `layers-async-backtrace` feature:
10
+
11
+ ```shell
12
+ cargo add opendal --features layers-async-backtrace
13
+ ```
14
+
15
+ The layer is available as `opendal::layers::AsyncBacktraceLayer` and can be
16
+ composed with an operator through `opendal::Operator::layer`.
17
+
18
+ ## Use with `opendal-core`
19
+
20
+ Add the split crates directly:
21
+
22
+ ```shell
23
+ cargo add opendal-core opendal-layer-async-backtrace
24
+ ```
25
+
26
+ Pass a configured layer to `Operator::layer`:
27
+
28
+ ```rust
29
+ use opendal_core::Operator;
30
+ use opendal_layer_async_backtrace::AsyncBacktraceLayer;
31
+
32
+ fn add_layer(operator: Operator, layer: AsyncBacktraceLayer) -> Operator {
33
+ operator.layer(layer)
34
+ }
35
+ ```
36
+
37
+ Construct and configure `layer` as described in the API documentation before
38
+ composing it with an operator.
39
+
40
+ ## Documentation
41
+
42
+ - [Rust API documentation](https://docs.rs/opendal-layer-async-backtrace)
43
+ - [Apache OpenDAL production guide](https://opendal.apache.org/docs/core/production)
44
+ - [Apache OpenDAL documentation](https://opendal.apache.org/docs/)
45
+
46
+ ## License
47
+
48
+ Licensed under the Apache License, Version 2.0.
@@ -15,21 +15,21 @@
15
15
  // specific language governing permissions and limitations
16
16
  // under the License.
17
17
 
18
- //! Async backtrace layer implementation for Apache OpenDAL.
19
-
18
+ #![doc = include_str!("../README.md")]
20
19
  #![cfg_attr(docsrs, feature(doc_cfg))]
20
+ #![cfg_attr(docsrs, doc(auto_cfg))]
21
21
  #![deny(missing_docs)]
22
-
23
22
  use std::sync::Arc;
24
23
 
25
24
  use opendal_core::raw::*;
26
25
  use opendal_core::*;
27
26
 
28
- /// Add Efficient, logical 'stack' traces of async functions for the underlying services.
27
+ /// `AsyncBacktraceLayer` records efficient logical stack traces for asynchronous
28
+ /// service operations.
29
29
  ///
30
30
  /// # Async Backtrace
31
31
  ///
32
- /// async-backtrace allows developers to get a stack trace of the async functions.
32
+ /// `async-backtrace` lets developers inspect the stack traces of asynchronous functions.
33
33
  /// Read more about [async-backtrace](https://docs.rs/async-backtrace/latest/async_backtrace/)
34
34
  ///
35
35
  /// # Examples
@@ -18,6 +18,7 @@
18
18
  [package]
19
19
  description = "Apache OpenDAL await-tree layer"
20
20
  name = "opendal-layer-await-tree"
21
+ readme = "README.md"
21
22
 
22
23
  authors = { workspace = true }
23
24
  edition = { workspace = true }
@@ -33,7 +34,7 @@ all-features = true
33
34
  [dependencies]
34
35
  await-tree = "0.3"
35
36
  futures = { workspace = true }
36
- opendal-core = { path = "../../core", version = "0.58.0", default-features = false }
37
+ opendal-core = { path = "../../core", version = "0.58.1", default-features = false }
37
38
 
38
39
  [dev-dependencies]
39
- opendal-core = { path = "../../core", version = "0.58.0" }
40
+ opendal-core = { path = "../../core", version = "0.58.1" }