Merge pull request #941 from MakMukhi/mmukhi_update_server_relection

update pre-generated code and server reflection code to comply with the change to the grpc g…
This commit is contained in:
Qi Zhao
2016-11-03 16:04:21 -07:00
committed by GitHub
12 changed files with 25 additions and 24 deletions

View File

@ -24,7 +24,7 @@ var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion3 const _ = grpc.SupportPackageIsVersion4
// Client API for BenchmarkService service // Client API for BenchmarkService service
@ -161,7 +161,7 @@ var _BenchmarkService_serviceDesc = grpc.ServiceDesc{
ClientStreams: true, ClientStreams: true,
}, },
}, },
Metadata: fileDescriptor3, Metadata: "services.proto",
} }
// Client API for WorkerService service // Client API for WorkerService service
@ -417,7 +417,7 @@ var _WorkerService_serviceDesc = grpc.ServiceDesc{
ClientStreams: true, ClientStreams: true,
}, },
}, },
Metadata: fileDescriptor3, Metadata: "services.proto",
} }
func init() { proto.RegisterFile("services.proto", fileDescriptor3) } func init() { proto.RegisterFile("services.proto", fileDescriptor3) }

View File

@ -65,7 +65,7 @@ var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion3 const _ = grpc.SupportPackageIsVersion4
// Client API for Greeter service // Client API for Greeter service
@ -130,7 +130,7 @@ var _Greeter_serviceDesc = grpc.ServiceDesc{
}, },
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: fileDescriptor0, Metadata: "helloworld.proto",
} }
func init() { proto.RegisterFile("helloworld.proto", fileDescriptor0) } func init() { proto.RegisterFile("helloworld.proto", fileDescriptor0) }

View File

@ -156,7 +156,7 @@ var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion3 const _ = grpc.SupportPackageIsVersion4
// Client API for RouteGuide service // Client API for RouteGuide service
@ -452,7 +452,7 @@ var _RouteGuide_serviceDesc = grpc.ServiceDesc{
ClientStreams: true, ClientStreams: true,
}, },
}, },
Metadata: fileDescriptor0, Metadata: "route_guide.proto",
} }
func init() { proto.RegisterFile("route_guide.proto", fileDescriptor0) } func init() { proto.RegisterFile("route_guide.proto", fileDescriptor0) }

View File

@ -420,7 +420,7 @@ var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion3 const _ = grpc.SupportPackageIsVersion4
// Client API for LoadBalancer service // Client API for LoadBalancer service
@ -517,7 +517,7 @@ var _LoadBalancer_serviceDesc = grpc.ServiceDesc{
ClientStreams: true, ClientStreams: true,
}, },
}, },
Metadata: fileDescriptor0, Metadata: "grpclb.proto",
} }
func init() { proto.RegisterFile("grpclb.proto", fileDescriptor0) } func init() { proto.RegisterFile("grpclb.proto", fileDescriptor0) }

View File

@ -90,7 +90,7 @@ var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion3 const _ = grpc.SupportPackageIsVersion4
// Client API for Health service // Client API for Health service
@ -153,7 +153,7 @@ var _Health_serviceDesc = grpc.ServiceDesc{
}, },
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: fileDescriptor0, Metadata: "health.proto",
} }
func init() { proto.RegisterFile("health.proto", fileDescriptor0) } func init() { proto.RegisterFile("health.proto", fileDescriptor0) }

View File

@ -407,7 +407,7 @@ var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion3 const _ = grpc.SupportPackageIsVersion4
// Client API for TestService service // Client API for TestService service
@ -789,7 +789,7 @@ var _TestService_serviceDesc = grpc.ServiceDesc{
ClientStreams: true, ClientStreams: true,
}, },
}, },
Metadata: fileDescriptor0, Metadata: "test.proto",
} }
func init() { proto.RegisterFile("test.proto", fileDescriptor0) } func init() { proto.RegisterFile("test.proto", fileDescriptor0) }

View File

@ -544,7 +544,7 @@ var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion3 const _ = grpc.SupportPackageIsVersion4
// Client API for ServerReflection service // Client API for ServerReflection service
@ -643,7 +643,7 @@ var _ServerReflection_serviceDesc = grpc.ServiceDesc{
ClientStreams: true, ClientStreams: true,
}, },
}, },
Metadata: fileDescriptor0, Metadata: "reflection.proto",
} }
func init() { proto.RegisterFile("reflection.proto", fileDescriptor0) } func init() { proto.RegisterFile("reflection.proto", fileDescriptor0) }

View File

@ -66,7 +66,7 @@ var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion3 const _ = grpc.SupportPackageIsVersion4
// Client API for SearchService service // Client API for SearchService service
@ -195,7 +195,7 @@ var _SearchService_serviceDesc = grpc.ServiceDesc{
ClientStreams: true, ClientStreams: true,
}, },
}, },
Metadata: fileDescriptor2, Metadata: "test.proto",
} }
func init() { proto.RegisterFile("test.proto", fileDescriptor2) } func init() { proto.RegisterFile("test.proto", fileDescriptor2) }

View File

@ -251,11 +251,12 @@ func (s *serverReflectionServer) fileDescEncodingContainingSymbol(name string) (
} }
// Metadata not valid. // Metadata not valid.
enc, ok := meta.([]byte) fileNameForMeta, ok := meta.(string)
if !ok { if !ok {
return nil, fmt.Errorf("invalid file descriptor for symbol: %v", name) return nil, fmt.Errorf("invalid file descriptor for symbol: %v", name)
} }
enc := proto.FileDescriptor(fileNameForMeta)
fd, err = s.decodeFileDesc(enc) fd, err = s.decodeFileDesc(enc)
if err != nil { if err != nil {
return nil, err return nil, err

View File

@ -448,10 +448,10 @@ func convertCode(err error) codes.Code {
return codes.Unknown 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. // 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 // 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 // requires a synchronised update of grpc-go and protoc-gen-go. This constant
// should not be referenced from any other code. // should not be referenced from any other code.
const SupportPackageIsVersion3 = true const SupportPackageIsVersion4 = true

View File

@ -205,7 +205,7 @@ var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion3 const _ = grpc.SupportPackageIsVersion4
// Client API for MetricsService service // Client API for MetricsService service
@ -335,7 +335,7 @@ var _MetricsService_serviceDesc = grpc.ServiceDesc{
ServerStreams: true, ServerStreams: true,
}, },
}, },
Metadata: fileDescriptor0, Metadata: "metrics.proto",
} }
func init() { proto.RegisterFile("metrics.proto", fileDescriptor0) } func init() { proto.RegisterFile("metrics.proto", fileDescriptor0) }

View File

@ -360,7 +360,7 @@ var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion3 const _ = grpc.SupportPackageIsVersion4
// Client API for TestService service // Client API for TestService service
@ -742,7 +742,7 @@ var _TestService_serviceDesc = grpc.ServiceDesc{
ClientStreams: true, ClientStreams: true,
}, },
}, },
Metadata: fileDescriptor0, Metadata: "test.proto",
} }
func init() { proto.RegisterFile("test.proto", fileDescriptor0) } func init() { proto.RegisterFile("test.proto", fileDescriptor0) }