Browse Source

server call busi seems ok

pull/25/head
yedf2 5 years ago
parent
commit
72ff2aa4a8
  1. 19
      examples/main_grpc.go

19
examples/main_grpc.go

@ -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
}
Loading…
Cancel
Save