diff --git a/helloworld/main.go b/helloworld/main.go index ea8c6a3..0c3e28c 100644 --- a/helloworld/main.go +++ b/helloworld/main.go @@ -4,6 +4,7 @@ import ( "github.com/micro/micro/v3/service" "github.com/micro/micro/v3/service/logger" "github.com/micro/services/helloworld/handler" + pb "github.com/micro/services/helloworld/proto" ) func main() { @@ -13,7 +14,7 @@ func main() { ) // Register Handler - srv.Handle(new(handler.Helloworld)) + pb.RegisterHelloworldHandler(srv.Server(), new(handler.Helloworld)) // Run the service if err := srv.Run(); err != nil { diff --git a/helloworld/proto/helloworld.proto b/helloworld/proto/helloworld.proto index ec8573f..fe706b3 100644 --- a/helloworld/proto/helloworld.proto +++ b/helloworld/proto/helloworld.proto @@ -5,7 +5,7 @@ package helloworld; option go_package = "./proto;helloworld"; service Helloworld { - rpc Call(Request) returns (Response) {} + rpc Call(Request) returns (Response) {}; rpc Stream(StreamRequest) returns (stream StreamResponse) {}; }