fix gRPC-integration.md

This commit is contained in:
liuyao 2021-04-12 20:27:02 +08:00
parent e0a3f15786
commit dc863f1dba
1 changed files with 3 additions and 2 deletions

View File

@ -135,6 +135,7 @@ import (
```go
// server is our user app
type server struct {
pb.UnimplementedAppCallbackServer
}
// EchoMethod is a simple demo method to invoke
@ -183,9 +184,9 @@ func (s *server) OnBindingEvent(ctx context.Context, in *pb.BindingEventRequest)
}
// This method is fired whenever a message has been published to a topic that has been subscribed. Dapr sends published messages in a CloudEvents 0.3 envelope.
func (s *server) OnTopicEvent(ctx context.Context, in *pb.TopicEventRequest) (*empty.Empty, error) {
func (s *server) OnTopicEvent(ctx context.Context, in *pb.TopicEventRequest) (*pb.TopicEventResponse, error) {
fmt.Println("Topic message arrived")
return &empty.Empty{}, nil
return &pb.TopicEventResponse{}, nil
}
```