Skip to content

Commit

Permalink
update server reflection code to comply with the change to the grpc g…
Browse files Browse the repository at this point in the history
…enerator
  • Loading branch information
MakMukhi committed Oct 22, 2016
1 parent 2b7e876 commit 727a60e
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion benchmark/grpc_testing/services.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/helloworld/helloworld/helloworld.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/route_guide/routeguide/route_guide.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion grpclb/grpc_lb_v1/grpclb.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion health/grpc_health_v1/health.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion interop/grpc_testing/test.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion reflection/grpc_reflection_v1alpha/reflection.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion reflection/grpc_testing/test.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion reflection/serverreflection.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,12 @@ func (s *serverReflectionServer) fileDescEncodingContainingSymbol(name string) (
}

// Metadata not valid.
enc, ok := meta.([]byte)
fileNameForMeta, ok := meta.(string)
if !ok {
return nil, fmt.Errorf("invalid file descriptor for symbol: %v", name)
}

enc := proto.FileDescriptor(fileNameForMeta)
fd, err = s.decodeFileDesc(enc)
if err != nil {
return nil, err
Expand Down
4 changes: 2 additions & 2 deletions rpc_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,10 @@ func convertCode(err error) codes.Code {
return codes.Unknown
}

// SupportPackageIsVersion3 is referenced from generated protocol buffer files
// SupportPackageIsVersion4 is referenced from generated protocol buffer files
// to assert that that code is compatible with this version of the grpc package.
//
// This constant may be renamed in the future if a change in the generated code
// requires a synchronised update of grpc-go and protoc-gen-go. This constant
// should not be referenced from any other code.
const SupportPackageIsVersion3 = true
const SupportPackageIsVersion4 = true
2 changes: 1 addition & 1 deletion stress/grpc_testing/metrics.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/grpc_testing/test.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 727a60e

Please sign in to comment.