mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-23 15:51:24 +00:00
fix helloworld proto
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"github.com/micro/micro/v3/service"
|
"github.com/micro/micro/v3/service"
|
||||||
"github.com/micro/micro/v3/service/logger"
|
"github.com/micro/micro/v3/service/logger"
|
||||||
"github.com/micro/services/helloworld/handler"
|
"github.com/micro/services/helloworld/handler"
|
||||||
|
pb "github.com/micro/services/helloworld/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@@ -13,7 +14,7 @@ func main() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Register Handler
|
// Register Handler
|
||||||
srv.Handle(new(handler.Helloworld))
|
pb.RegisterHelloworldHandler(srv.Server(), new(handler.Helloworld))
|
||||||
|
|
||||||
// Run the service
|
// Run the service
|
||||||
if err := srv.Run(); err != nil {
|
if err := srv.Run(); err != nil {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ package helloworld;
|
|||||||
option go_package = "./proto;helloworld";
|
option go_package = "./proto;helloworld";
|
||||||
|
|
||||||
service Helloworld {
|
service Helloworld {
|
||||||
rpc Call(Request) returns (Response) {}
|
rpc Call(Request) returns (Response) {};
|
||||||
rpc Stream(StreamRequest) returns (stream StreamResponse) {};
|
rpc Stream(StreamRequest) returns (stream StreamResponse) {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user