Skip to content

Commit 7d210f2

Browse files
feat: Oci downloader (#1918)
1 parent c0fbf84 commit 7d210f2

File tree

7 files changed

+524
-2
lines changed

7 files changed

+524
-2
lines changed

Cargo.lock

Lines changed: 99 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

THIRD_PARTY_NOTICES.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,13 @@ Distributed under the following license(s):
10591059
* MIT
10601060
* Apache-2.0
10611061

1062+
## http-auth <https://crates.io/crates/http-auth>
1063+
1064+
Distributed under the following license(s):
1065+
1066+
* MIT
1067+
* Apache-2.0
1068+
10621069
## http-body <https://crates.io/crates/http-body>
10631070

10641071
Distributed under the following license(s):
@@ -1305,6 +1312,12 @@ Distributed under the following license(s):
13051312

13061313
* MIT
13071314

1315+
## jwt <https://crates.io/crates/jwt>
1316+
1317+
Distributed under the following license(s):
1318+
1319+
* MIT
1320+
13081321
## k8s-openapi <https://crates.io/crates/k8s-openapi>
13091322

13101323
Distributed under the following license(s):
@@ -1585,6 +1598,12 @@ Distributed under the following license(s):
15851598

15861599
* MIT
15871600

1601+
## oci-client <https://crates.io/crates/oci-client>
1602+
1603+
Distributed under the following license(s):
1604+
1605+
* Apache-2.0
1606+
15881607
## oci-spec <https://crates.io/crates/oci-spec>
15891608

15901609
Distributed under the following license(s):
@@ -1598,6 +1617,13 @@ Distributed under the following license(s):
15981617
* MIT
15991618
* Apache-2.0
16001619

1620+
## olpc-cjson <https://crates.io/crates/olpc-cjson>
1621+
1622+
Distributed under the following license(s):
1623+
1624+
* MIT
1625+
* Apache-2.0
1626+
16011627
## once_cell <https://crates.io/crates/once_cell>
16021628

16031629
Distributed under the following license(s):
@@ -2373,6 +2399,22 @@ Distributed under the following license(s):
23732399

23742400
* Unicode-3.0
23752401

2402+
## tinyvec <https://crates.io/crates/tinyvec>
2403+
2404+
Distributed under the following license(s):
2405+
2406+
* Zlib
2407+
* Apache-2.0
2408+
* MIT
2409+
2410+
## tinyvec_macros <https://crates.io/crates/tinyvec_macros>
2411+
2412+
Distributed under the following license(s):
2413+
2414+
* MIT
2415+
* Apache-2.0
2416+
* Zlib
2417+
23762418
## tokio <https://crates.io/crates/tokio>
23772419

23782420
Distributed under the following license(s):
@@ -2555,6 +2597,13 @@ Distributed under the following license(s):
25552597
* MIT
25562598
* Apache-2.0
25572599

2600+
## unicase <https://crates.io/crates/unicase>
2601+
2602+
Distributed under the following license(s):
2603+
2604+
* MIT
2605+
* Apache-2.0
2606+
25582607
## unicode-ident <https://crates.io/crates/unicode-ident>
25592608

25602609
Distributed under the following license(s):
@@ -2563,6 +2612,13 @@ Distributed under the following license(s):
25632612
* Apache-2.0
25642613
* Unicode-3.0
25652614

2615+
## unicode-normalization <https://crates.io/crates/unicode-normalization>
2616+
2617+
Distributed under the following license(s):
2618+
2619+
* MIT
2620+
* Apache-2.0
2621+
25662622
## unicode-segmentation <https://crates.io/crates/unicode-segmentation>
25672623

25682624
Distributed under the following license(s):
@@ -2688,6 +2744,13 @@ Distributed under the following license(s):
26882744
* MIT
26892745
* Apache-2.0
26902746

2747+
## wasm-streams <https://crates.io/crates/wasm-streams>
2748+
2749+
Distributed under the following license(s):
2750+
2751+
* MIT
2752+
* Apache-2.0
2753+
26912754
## web-sys <https://crates.io/crates/web-sys>
26922755

26932756
Distributed under the following license(s):

agent-control/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ oci-spec = "0.8.3"
7575
flate2 = "1.1.5"
7676
tar = "0.4.44"
7777
zip = "6.0.0"
78+
oci-client = { version = "0.15.0", features = ["rustls-tls"], default-features = false }
79+
rustls-pki-types = { version = "1.13.1", features = ["std"] }
7880

7981
[target.'cfg(target_family = "unix")'.dependencies]
8082
nix = { workspace = true, features = ["signal", "user", "hostname"] }

agent-control/src/http/client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ fn certs_from_file(path: &Path) -> Result<Vec<Certificate>, HttpBuildError> {
287287
}
288288

289289
/// Returns all paths to be considered to load certificates under the provided directory path.
290-
fn cert_paths_from_dir(dir_path: &Path) -> Result<Vec<PathBuf>, HttpBuildError> {
290+
pub fn cert_paths_from_dir(dir_path: &Path) -> Result<Vec<PathBuf>, HttpBuildError> {
291291
if dir_path.as_os_str().is_empty() {
292292
return Ok(Vec::new());
293293
}
@@ -308,7 +308,7 @@ fn cert_paths_from_dir(dir_path: &Path) -> Result<Vec<PathBuf>, HttpBuildError>
308308
}
309309

310310
/// Helper to build a [HttpBuildError::CertificateError] more concisely.
311-
fn certificate_error<E: Display>(path: &Path, err: E) -> HttpBuildError {
311+
pub fn certificate_error<E: Display>(path: &Path, err: E) -> HttpBuildError {
312312
HttpBuildError::CertificateError {
313313
path: path.to_string_lossy().into(),
314314
err: err.to_string(),

agent-control/src/packages.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
pub mod extract;
2+
3+
pub mod oci;

agent-control/src/packages/oci.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub mod downloader;

0 commit comments

Comments
 (0)