mirror of
https://github.com/SourceFellows/gobuch.git
synced 2024-10-22 13:57:13 +00:00
18 lines
389 B
Go
18 lines
389 B
Go
|
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
|
||
|
}
|