server call busi seems ok

This commit is contained in:
yedf2 2021-08-09 14:45:18 +08:00
parent 0d0c868374
commit 72ff2aa4a8

19
examples/main_grpc.go Normal file
View File

@ -0,0 +1,19 @@
package examples
import (
"context"
"log"
dtmcli "github.com/yedf/dtm/dtmcli"
)
// busiServer is used to implement helloworld.GreeterServer.
type busiServer struct {
UnimplementedBusiServer
}
// SayHello implements helloworld.GreeterServer
func (s *busiServer) Call(ctx context.Context, in *dtmcli.BusiRequest) (*dtmcli.BusiReply, error) {
log.Printf("busiServer received: %v", in)
return &dtmcli.BusiReply{DtmResult: "SUCCESS", DtmMessage: "ok"}, nil
}