Add a bed for the signed-login bus over a real network (research 053 question 8)

This commit is contained in:
2026-10-16 01:10:38 +02:00
parent f024be6e04
commit d77e4062dd
8 changed files with 1034 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
// Command q8lab is the program behind test/integration/signed-logins.test.ts (research 053, question 8).
//
// q8lab gen -out DIR -a IP -b IP -c IP writes keys and the three servers' configs (runs on the workstation)
// q8lab server -conf FILE runs one nats-server 2.11.17 (embedded) until killed
// q8lab agent -peer IP on machine C: an HTTP switch that cuts and restores traffic to the peer
// q8lab wait -url URL waits until the URL answers 200
// q8lab drive -keys FILE on machine A: runs the measurements and prints them
package main
import (
"fmt"
"os"
)
func main() {
if len(os.Args) < 2 {
fmt.Println("usage: q8lab gen|server|agent|wait|drive")
os.Exit(2)
}
args := os.Args[2:]
switch os.Args[1] {
case "gen":
gen(args)
case "server":
runServer(args)
case "agent":
runAgent(args)
case "wait":
runWait(args)
case "drive":
drive(args)
default:
fmt.Println("unknown command", os.Args[1])
os.Exit(2)
}
}