Skip to content

Commit

Permalink
Add support library for returning Dropshot range requests (#6963)
Browse files Browse the repository at this point in the history
This library is used as a part of
#1599 , I'm pulling it
out of #6782 to help make
the diff smaller.

This PR adds a `range-requests` crate for dropshot-based range requests.

Heavily inspired by @jclulow 's work in
https://github.com/oxidecomputer/buildomat/blob/main/download/src/lib.rs
  • Loading branch information
smklein authored Nov 21, 2024
1 parent 85605b0 commit bb3536f
Show file tree
Hide file tree
Showing 4 changed files with 582 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ members = [
"oximeter/types",
"package",
"passwords",
"range-requests",
"rpaths",
"sled-agent",
"sled-agent/api",
Expand Down Expand Up @@ -232,6 +233,7 @@ default-members = [
"oximeter/types",
"package",
"passwords",
"range-requests",
"rpaths",
"sled-agent",
"sled-agent/api",
Expand Down Expand Up @@ -404,7 +406,9 @@ hickory-server = "0.24.1"
highway = "1.2.0"
hkdf = "0.12.4"
http = "1.1.0"
http-body = "1.0.1"
http-body-util = "0.1.2"
http-range = "0.1.5"
httpmock = "0.8.0-alpha.1"
httptest = "0.16.1"
hubtools = { git = "https://github.com/oxidecomputer/hubtools.git", branch = "main" }
Expand Down Expand Up @@ -546,6 +550,7 @@ rand = "0.8.5"
rand_core = "0.6.4"
rand_distr = "0.4.3"
rand_seeder = "0.3.0"
range-requests = { path = "range-requests" }
ratatui = "0.28.1"
rayon = "1.10"
rcgen = "0.12.1"
Expand Down
26 changes: 26 additions & 0 deletions range-requests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[package]
name = "range-requests"
description = "Helpers for making and receiving range requests"
version = "0.1.0"
edition = "2021"
license = "MPL-2.0"

[lints]
workspace = true

[dependencies]
bytes.workspace = true
dropshot.workspace = true
futures.workspace = true
http.workspace = true
http-range.workspace = true
http-body-util.workspace = true
hyper.workspace = true
thiserror.workspace = true
omicron-workspace-hack.workspace = true

[dev-dependencies]
http-body.workspace = true
proptest.workspace = true
tokio.workspace = true
tokio-util.workspace = true
Loading

0 comments on commit bb3536f

Please sign in to comment.