You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bump vgi-rpc-go to v0.10.0 (adds Server.RunTcp) and expose the raw
Arrow-IPC TCP transport through the worker:
- Worker.RunTcp(host, port, idleTimeout) serves via Server.RunTcp and
prints the TCP:<host>:<port> launcher discovery line with the actual
bound port (so ephemeral port==0 binds are discoverable).
- New transportTCP server class (concurrent connections, no cleanup
hook — same as unix).
- Example worker accepts --tcp [HOST:]PORT (host defaults to
127.0.0.1), mutually exclusive with --http/--unix. Registered in
filterKnownFlags as a value-consuming flag so the space-separated
form parses.
Raw TCP framing carries no auth/encryption (loopback/trusted networks
only); HTTP remains the transport for untrusted networks.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: cmd/vgi-example-worker/main.go
+38-3Lines changed: 38 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ import (
9
9
"log"
10
10
"math"
11
11
"os"
12
+
"strconv"
12
13
"strings"
13
14
"time"
14
15
@@ -26,7 +27,8 @@ import (
26
27
funcmain() {
27
28
httpMode:=flag.Bool("http", false, "Run as HTTP server instead of stdio")
28
29
unixPath:=flag.String("unix", "", "Bind to this AF_UNIX socket path (launcher transport); mutually exclusive with --http")
29
-
idleTimeout:=flag.Float64("idle-timeout", 300, "Self-shutdown after N seconds idle when serving --unix (0 = never)")
30
+
tcpAddr:=flag.String("tcp", "", "Bind a raw TCP socket ([HOST:]PORT, host defaults to 127.0.0.1, port 0 auto-selects); mutually exclusive with --http/--unix")
31
+
idleTimeout:=flag.Float64("idle-timeout", 300, "Self-shutdown after N seconds idle when serving --unix/--tcp (0 = never)")
30
32
// --describe / --no-describe: accepted for launcher compatibility (the VGI
31
33
// extension passes it through). Description pages aren't served over the
32
34
// socket/stdio transports, so it is currently a no-op here.
@@ -38,6 +40,7 @@ func main() {
38
40
// rather than failing to start. Flags named here consume a value token.
0 commit comments