gobuch/microservices/grpc/server/helloService.go

18 lines
389 B
Go
Raw Permalink Normal View History

2020-08-21 04:26:40 +00:00
package server
import (
context "context"
empty "github.com/golang/protobuf/ptypes/empty"
"golang.source-fellows.com/samples/grpc/hello"
)
type HelloService struct {
hello.UnimplementedHelloWorldServiceServer
}
func (hs *HelloService) SayHello(context.Context, *empty.Empty) (*hello.HelloMessage, error) {
msg := &hello.HelloMessage{MessageText: "Hello World"}
return msg, nil
}