Documentation
¶
Overview ¶
Command starter-client is a minimal, self-contained holt peer — a template to copy when writing your own client. It joins a hub with a token from `holt enroll`, serves one HTTP handler over the tunnel, and listens on nothing.
Everything a peer needs is here and nothing else: token.Decode the join token, then holt.NewClient your handler (JWT auth rides the WebSocket upgrade; the tunnel URL's scheme picks the transport). Only public packages are used — copy this file and go.
# on the hub machine: holt hub & holt enroll myservice # prints a token # anywhere: go run ./cmd/starter-client --token <paste> # reach it through the hub: curl -H 'x-tunnel-peer: myservice' http://localhost:7202/