server call busi seems ok
This commit is contained in:
parent
0d0c868374
commit
72ff2aa4a8
19
examples/main_grpc.go
Normal file
19
examples/main_grpc.go
Normal 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
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user