Skip to content

Commit d6ce657

Browse files
authored
proto updates (#107)
1 parent 309bf13 commit d6ce657

File tree

8 files changed

+1294
-739
lines changed

8 files changed

+1294
-739
lines changed

Makefile

+10-2
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ clean: ## Cleans go and generated files in ./dapr/proto/
9191
protos: ## Downloads proto files from dapr/dapr master and generats gRPC proto clients
9292
go install github.com/gogo/protobuf/gogoreplace
9393

94+
rm -f ./dapr/proto/common/v1/*
95+
rm -f ./dapr/proto/runtime/v1/*
96+
9497
wget -q $(PROTO_ROOT)/common/v1/common.proto -O ./dapr/proto/common/v1/common.proto
9598
gogoreplace 'option go_package = "github.com/dapr/dapr/pkg/proto/common/v1;common";' \
9699
'option go_package = "github.com/dapr/go-sdk/dapr/proto/common/v1;common";' \
@@ -106,8 +109,13 @@ protos: ## Downloads proto files from dapr/dapr master and generats gRPC proto c
106109
'option go_package = "github.com/dapr/go-sdk/dapr/proto/runtime/v1;runtime";' \
107110
./dapr/proto/runtime/v1/dapr.proto
108111

109-
protoc -I . --go_out=plugins=grpc:. --go_opt=paths=source_relative ./dapr/proto/common/v1/*.proto
110-
protoc -I . --go_out=plugins=grpc:. --go_opt=paths=source_relative ./dapr/proto/runtime/v1/*.proto
112+
protoc --go_out=. --go_opt=paths=source_relative \
113+
--go-grpc_out=. --go-grpc_opt=paths=source_relative \
114+
dapr/proto/common/v1/common.proto
115+
116+
protoc --go_out=. --go_opt=paths=source_relative \
117+
--go-grpc_out=. --go-grpc_opt=paths=source_relative \
118+
dapr/proto/runtime/v1/*.proto
111119

112120
rm -f ./dapr/proto/common/v1/*.proto
113121
rm -f ./dapr/proto/runtime/v1/*.proto

client/client_test.go

+14
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"testing"
99

1010
"github.com/golang/protobuf/ptypes/empty"
11+
"github.com/pkg/errors"
1112
"github.com/stretchr/testify/assert"
1213

1314
"google.golang.org/grpc"
@@ -94,6 +95,7 @@ func getTestClient(ctx context.Context) (client Client, closer func()) {
9495
}
9596

9697
type testDaprServer struct {
98+
pb.UnimplementedDaprServer
9799
state map[string][]byte
98100
}
99101

@@ -187,3 +189,15 @@ func (s *testDaprServer) GetSecret(ctx context.Context, req *pb.GetSecretRequest
187189
Data: d,
188190
}, nil
189191
}
192+
193+
func (s *testDaprServer) InvokeActor(context.Context, *pb.InvokeActorRequest) (*pb.InvokeActorResponse, error) {
194+
return nil, errors.New("actors not implemented in go SDK")
195+
}
196+
197+
func (s *testDaprServer) RegisterActorTimer(context.Context, *pb.RegisterActorTimerRequest) (*empty.Empty, error) {
198+
return nil, errors.New("actors not implemented in go SDK")
199+
}
200+
201+
func (s *testDaprServer) UnregisterActorTimer(context.Context, *pb.UnregisterActorTimerRequest) (*empty.Empty, error) {
202+
return nil, errors.New("actors not implemented in go SDK")
203+
}

dapr/proto/common/v1/common.pb.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dapr/proto/runtime/v1/appcallback.pb.go

+1-245
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)