Shaswot/cloudlfare native#736
Conversation
…using the Cloudflare REST API (v4). The implementation follows the same patterns as the existing AWS, Azure, and GCP backends in this codebase.
|
Thanks for the PR. I think it makes sense to add cloudflare r2 to this repo since its an object storage implementation. What is the purpose of adding cloudflare workers? Looking at the docs, workers are compute nodes https://developers.cloudflare.com/r2/api/workers/workers-api-usage/ |
|
I think we should have an issue discussion about this before making a PR. It's a significant new amount of code.
None of those really seem like big enough pros for me to have a whole new implementation, when the AWS implementation already works for Cloudflare. Is there a performance difference?
Agreed I don't see the benefits of |
|
Thank you for this PR @shaswot16 . I am not sure this crate has the bandwidth to take on the maintenance of another object store implementation unless one of the other maintainers would like to volunteer (basically echoing what @kylebarron says) Given that the implementations are easy to implement using the core traits, perhaps we can implement cloudflare support as another crate (e.g. |
Which issue does this PR close?
Closes #XXX
(Create an issue first if one does not already exist.)
Rationale for this change
Cloudflare R2 is a widely used object storage service that exposes both an S3-compatible API and a native Cloudflare REST API. While R2 can already be accessed through the existing
AmazonS3backend, a dedicated Cloudflare R2 implementation provides several advantages:wasm32supportThis follows the existing pattern of providing dedicated backends for major cloud providers such as AWS, Azure, and GCP.
What changes are included in this PR?
Core Implementation
CloudflareR2object store implementationObjectStoreMultipartStorePaginatedListStoreBuilder and Configuration
CloudflareR2BuilderCloudflareConfigKeyfrom_env)r2://URL scheme parsingAuthentication
CloudflareCredentialHTTP Client
Cloudflare Workers Support
CloudflareR2Workerswasm32)cloudflare-workersLibrary Integration
ObjectStoreScheme::CloudflareR2r2://scheme support in URL parsingCargo Features
Added two new optional features: