apache / apache/arrow-rs-object-store

Expose several private functions to allow easier implemenation of `HttpService` and `HttpConnector`

Open
#642 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
322
Forks
212
Avg merge
5d 2h
Merged PRs (30d)
10

Description

**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**

Hi there 👋 I've been trying to implement the `HttpService` and `HttpConnector` traits to allow me to trace the HTTP calls that object store is making. However, several functions used in the implementation for `HttpService` on `reqwest::Client` (which I am essentially replicating, with the addition of the tracing) are private so I cannot reuse them in my implementation.

These are:
* `HttpError::reqwest`
* `HttpRequestBody::into_reqwest`
* `‎ClientOptions::client`

**Describe the solution you'd like**
These functions to be made `pub`.

**Describe alternatives you've considered**
None, however, keen to hear if the there would be a better way to trace the calls.

**Additional context**
N/A

Happy to handle the PR for this (should be trivial), just wanted to make sure it was not misguided!

Contributor guide

Open the contributing guide

Research direction

Start by locating the definitions of HttpError::reqwest, HttpRequestBody::into_reqwest, and ClientOptions::client, then read the HttpService and HttpConnector implementations that need them. Check the crate's visibility and API conventions before making the functions public; done means those implementations can reuse the functions without duplicating them and the existing project checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
43/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.