Add http endpoints

This commit is contained in:
Barak Michener 2020-12-04 18:06:24 -08:00
parent 3b05f4316c
commit 56116aea2a
7 changed files with 136 additions and 1 deletions

View file

@ -17,6 +17,7 @@ import (
var (
gRPCPort = flag.Int("grpc-port", 50050, "The gRPC server port")
httpPort = flag.Int("http-port", 8080, "The HTTP server port")
webRoot = flag.String("web-root", "web", "path to static web files")
)
var log grpclog.LoggerV2
@ -41,6 +42,7 @@ func main() {
server := NewMemRaylet()
ray_rpc.RegisterRayletDriverServer(s, server)
ray_rpc.RegisterRayletWorkerConnectionServer(s, server)
go runHttp(fmt.Sprintf(":%d", *httpPort), *webRoot, server)
// Serve gRPC Server
fmt.Println("Serving gRPC on https://", addr)