-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[nexus] Support Bundle HTTP endpoint implementations #7187
base: support-bundle-bg-task
Are you sure you want to change the base?
[nexus] Support Bundle HTTP endpoint implementations #7187
Conversation
let mut builder = Response::builder().status(response.status()); | ||
let headers = builder.headers_mut().unwrap(); | ||
headers.extend( | ||
response.headers().iter().map(|(k, v)| (k.clone(), v.clone())), | ||
); | ||
let body = http_body_util::StreamBody::new( | ||
response | ||
.into_inner_stream() | ||
.map_ok(|b| hyper::body::Frame::data(b)), | ||
); | ||
Ok(builder.body(Body::wrap(body)).unwrap()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My intent here is to act as much like a transparent proxy as I can -- find the sled that should hold the bundle, and send a request there.
If it's possible to do that without these types, I'd love that.
.await?; | ||
let client = self.sled_client(&sled_id).await?; | ||
|
||
// TODO: Use "range"? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how to do this with the progenitor-generated API.
I could pull out the reqwest client manually, with client.client()
(names are silly) , and then I could manually construct the URL / body / headers, but... that kinda defeats the point of using progenitor, right?
That might be our only option for the moment.
07be0de
to
9b2176c
Compare
PR 4 / ??
Implements support bundle APIs for accessing storage bundles.
Builds atop the API skeleton in:
Uses the support bundle datastore interfaces in:
Relies on the background task in:
TODO before merging: