about summary refs log tree commit diff
path: root/tvix/nar-bridge/src/lib.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-07-20T12·03+0200
committerflokli <flokli@flokli.de>2024-07-20T17·38+0000
commit6180a7cecfc00349c65ca5425b5cfb1a572a1cb8 (patch)
treee6ccd85575d9394c9b0a7dbbbb59df8ceac8dd8b /tvix/nar-bridge/src/lib.rs
parent5bd48de4185fb670c5c15cb4c046503b66c430c6 (diff)
feat(tvix/nar-bridge): implement PUT $outhash.narinfo r/8379
This adds support to upload NARInfo files. We lookup the root node from
the LRU cache, rename it appropriately and then put it into the
PathInfoService.

Change-Id: I5479032b51cd855363bc016dee63cf84b3304a36
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11988
Tested-by: BuildkiteCI
Reviewed-by: Brian Olsen <me@griff.name>
Diffstat (limited to 'tvix/nar-bridge/src/lib.rs')
-rw-r--r--tvix/nar-bridge/src/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/tvix/nar-bridge/src/lib.rs b/tvix/nar-bridge/src/lib.rs
index 46390e865971..2f3dd82439b1 100644
--- a/tvix/nar-bridge/src/lib.rs
+++ b/tvix/nar-bridge/src/lib.rs
@@ -59,6 +59,7 @@ pub fn gen_router(priority: u64) -> Router<AppState> {
         .route("/nar/tvix-castore/:root_node_enc", get(nar::get))
         .route("/:narinfo_str", get(narinfo::get))
         .route("/:narinfo_str", head(narinfo::head))
+        .route("/:narinfo_str", put(narinfo::put))
         .route("/nix-cache-info", get(move || nix_cache_info(priority)))
 }