overflow_gateway_service/server/rpc.go
snoop df1d7acb04 fixed
address
2017-05-29 20:32:23 +09:00

23 lines
383 B
Go

package server
import (
"net"
"google.golang.org/grpc"
pb "git.loafle.net/overflow/overflow_api_service/grpc"
"git.loafle.net/overflow/overflow_gateway_service/gateway"
)
func RunRpc() error {
l, err := net.Listen("tcp", ":9090")
if err != nil {
return err
}
s := grpc.NewServer()
pb.RegisterOverflowGatewayServer(s, &gateway.ServiceImpl{})
s.Serve(l)
return nil
}