From dc863f1dbaca08dfa16ca6998b1694ca09e6066b Mon Sep 17 00:00:00 2001 From: liuyao Date: Mon, 12 Apr 2021 20:27:02 +0800 Subject: [PATCH 1/4] fix gRPC-integration.md --- .../developing-applications/integrations/gRPC-integration.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daprdocs/content/en/developing-applications/integrations/gRPC-integration.md b/daprdocs/content/en/developing-applications/integrations/gRPC-integration.md index c5e32f8b4..554bf7561 100644 --- a/daprdocs/content/en/developing-applications/integrations/gRPC-integration.md +++ b/daprdocs/content/en/developing-applications/integrations/gRPC-integration.md @@ -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 } ``` From 8ac1551a3e0ed66bf5c34f23200552f29c06fbf7 Mon Sep 17 00:00:00 2001 From: liuyao Date: Mon, 12 Apr 2021 20:37:40 +0800 Subject: [PATCH 2/4] fix gRPC-integration.md --- .../en/developing-applications/integrations/gRPC-integration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/developing-applications/integrations/gRPC-integration.md b/daprdocs/content/en/developing-applications/integrations/gRPC-integration.md index 554bf7561..dfaaeda64 100644 --- a/daprdocs/content/en/developing-applications/integrations/gRPC-integration.md +++ b/daprdocs/content/en/developing-applications/integrations/gRPC-integration.md @@ -86,7 +86,7 @@ data := []byte("ping") // create the client client, err := dapr.NewClient() if err != nil { - logger.Panic(err) + log.Panic(err) } defer client.Close() ``` From ba5a25ed2d937e82e4db088a50211b51fb914681 Mon Sep 17 00:00:00 2001 From: liuyao Date: Mon, 12 Apr 2021 20:40:04 +0800 Subject: [PATCH 3/4] fix gRPC-integration.md --- .../integrations/gRPC-integration.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daprdocs/content/en/developing-applications/integrations/gRPC-integration.md b/daprdocs/content/en/developing-applications/integrations/gRPC-integration.md index dfaaeda64..d02ab1985 100644 --- a/daprdocs/content/en/developing-applications/integrations/gRPC-integration.md +++ b/daprdocs/content/en/developing-applications/integrations/gRPC-integration.md @@ -95,11 +95,11 @@ defer client.Close() ```go // save state with the key key1 -err = client.SaveStateData(ctx, "statestore", "key1", "1", data) +err = client.SaveState(ctx, "statestore", "key1", data) if err != nil { - logger.Panic(err) + log.Panic(err) } -logger.Println("data saved") +log.Println("data saved") ``` Hooray! From 5e0b4f861e5962a038790c8ec5b0c3812f22d359 Mon Sep 17 00:00:00 2001 From: Javier Vela Date: Mon, 19 Apr 2021 19:47:23 +0200 Subject: [PATCH 4/4] common issues update link increase liveness to k8s annotations --- daprdocs/content/en/operations/troubleshooting/common_issues.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/operations/troubleshooting/common_issues.md b/daprdocs/content/en/operations/troubleshooting/common_issues.md index 581a041ff..e6901efd5 100644 --- a/daprdocs/content/en/operations/troubleshooting/common_issues.md +++ b/daprdocs/content/en/operations/troubleshooting/common_issues.md @@ -84,7 +84,7 @@ The most common cause of this failure is that a component (such as a state store To diagnose the root cause: -- Significantly increase the liveness probe delay - [link]({{< ref "kubernetes-overview.md" >}}) +- Significantly increase the liveness probe delay - [link]({{< ref "kubernetes-annotations.md" >}}) - Set the log level of the sidecar to debug - [link]({{< ref "logs-troubleshooting.md#setting-the-sidecar-log-level" >}}) - Watch the logs for meaningful information - [link]({{< ref "logs-troubleshooting.md#viewing-logs-on-kubernetes" >}})