From 8239f32b62c4363377f0c513dbcd76dd1e50d01e Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 3 Oct 2023 15:23:36 +0300 Subject: [PATCH] refactor(tvix/nar-bridge): mv nar-bridge{,-http} Rename the nar-bridge CLI to nar-bridge-http, because it's the one spinning up an http server. Change-Id: I0fb75c50e4299272a128dd5ecaa4be8f06fa3dbe Reviewed-on: https://cl.tvl.fyi/c/depot/+/9538 Reviewed-by: Connor Brewster Tested-by: BuildkiteCI Autosubmit: flokli --- tvix/boot/README.md | 4 ++-- tvix/nar-bridge/.gitignore | 2 +- tvix/nar-bridge/cmd/{nar-bridge => nar-bridge-http}/main.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename tvix/nar-bridge/cmd/{nar-bridge => nar-bridge-http}/main.go (97%) diff --git a/tvix/boot/README.md b/tvix/boot/README.md index cf593dcc0..13a485506 100644 --- a/tvix/boot/README.md +++ b/tvix/boot/README.md @@ -43,9 +43,9 @@ Potentially copy some data into tvix-store (via nar-bridge): ``` mg run //tvix:store -- daemon & -mg run //tvix:nar-bridge -- & +$(mg build //tvix:nar-bridge)/bin/nar-bridge-http & rm -Rf ~/.cache/nix; nix copy --to http://localhost:9000\?compression\=none $(mg build //third_party/nixpkgs:hello) -pkill nar-bridge; pkill tvix-store +pkill nar-bridge-http; pkill tvix-store ``` #### Interactive shell diff --git a/tvix/nar-bridge/.gitignore b/tvix/nar-bridge/.gitignore index 04260dbc5..867be7a12 100644 --- a/tvix/nar-bridge/.gitignore +++ b/tvix/nar-bridge/.gitignore @@ -1 +1 @@ -/nar_bridge +/nar-bridge-http diff --git a/tvix/nar-bridge/cmd/nar-bridge/main.go b/tvix/nar-bridge/cmd/nar-bridge-http/main.go similarity index 97% rename from tvix/nar-bridge/cmd/nar-bridge/main.go rename to tvix/nar-bridge/cmd/nar-bridge-http/main.go index d86e84b87..39892d37f 100644 --- a/tvix/nar-bridge/cmd/nar-bridge/main.go +++ b/tvix/nar-bridge/cmd/nar-bridge-http/main.go @@ -55,7 +55,7 @@ func main() { 30, ) - log.Printf("Starting nar-bridge at %v", cli.ListenAddr) + log.Printf("Starting nar-bridge-http at %v", cli.ListenAddr) go s.ListenAndServe(cli.ListenAddr) // listen for the interrupt signal.