| vflag "veyron/security/flag" |
| "veyron/services/mgmt/build/impl" |
| "veyron2/services/mgmt/build" |
| // TODO(rthellend): Remove the protocol and address flags when the config |
| protocol = flag.String("protocol", "tcp", "protocol to listen on") |
| address = flag.String("address", ":0", "address to listen on") |
| gobin = flag.String("gobin", "go", "path to the Go compiler") |
| name = flag.String("name", "", "name to mount the build server as") |
| server, err := runtime.NewServer() |
| vlog.Errorf("NewServer() failed: %v", err) |
| endpoint, err := server.Listen(*protocol, *address) |
| vlog.Errorf("Listen(%v, %v) failed: %v", *protocol, *address, err) |
| if err := server.Serve(*name, ipc.SoloDispatcher(build.NewServerBuilder(impl.NewInvoker(*gobin)), vflag.NewAuthorizerOrDie())); err != nil { |
| vlog.Errorf("Serve(%v) failed: %v", *name, err) |
| vlog.Infof("Build server endpoint=%q name=%q", endpoint, *name) |
| <-signals.ShutdownOnSignals() |