Manfred Touron 5448f25fd6
glide up
2017-05-18 23:33:43 +02:00

26 lines
538 B
Go

package server
import (
"net"
examples "github.com/grpc-ecosystem/grpc-gateway/examples/examplepb"
"google.golang.org/grpc"
)
func Run() error {
l, err := net.Listen("tcp", ":9090")
if err != nil {
return err
}
s := grpc.NewServer()
examples.RegisterEchoServiceServer(s, newEchoServer())
examples.RegisterFlowCombinationServer(s, newFlowCombinationServer())
abe := newABitOfEverythingServer()
examples.RegisterABitOfEverythingServiceServer(s, abe)
examples.RegisterStreamServiceServer(s, abe)
s.Serve(l)
return nil
}