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…
diff --git a/benchmark/grpc_testing/services.pb.go b/benchmark/grpc_testing/services.pb.go
index 15d0864..2aae317 100644
--- a/benchmark/grpc_testing/services.pb.go
+++ b/benchmark/grpc_testing/services.pb.go
@@ -24,7 +24,7 @@
 
 // This is a compile-time assertion to ensure that this generated file
 // is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion3
+const _ = grpc.SupportPackageIsVersion4
 
 // Client API for BenchmarkService service
 
@@ -161,7 +161,7 @@
 			ClientStreams: true,
 		},
 	},
-	Metadata: fileDescriptor3,
+	Metadata: "services.proto",
 }
 
 // Client API for WorkerService service
@@ -417,7 +417,7 @@
 			ClientStreams: true,
 		},
 	},
-	Metadata: fileDescriptor3,
+	Metadata: "services.proto",
 }
 
 func init() { proto.RegisterFile("services.proto", fileDescriptor3) }
diff --git a/examples/helloworld/helloworld/helloworld.pb.go b/examples/helloworld/helloworld/helloworld.pb.go
index 0419f6a..c8c8942 100644
--- a/examples/helloworld/helloworld/helloworld.pb.go
+++ b/examples/helloworld/helloworld/helloworld.pb.go
@@ -65,7 +65,7 @@
 
 // This is a compile-time assertion to ensure that this generated file
 // is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion3
+const _ = grpc.SupportPackageIsVersion4
 
 // Client API for Greeter service
 
@@ -130,7 +130,7 @@
 		},
 	},
 	Streams:  []grpc.StreamDesc{},
-	Metadata: fileDescriptor0,
+	Metadata: "helloworld.proto",
 }
 
 func init() { proto.RegisterFile("helloworld.proto", fileDescriptor0) }
diff --git a/examples/route_guide/routeguide/route_guide.pb.go b/examples/route_guide/routeguide/route_guide.pb.go
index 9bb1d60..cbcf2f3 100644
--- a/examples/route_guide/routeguide/route_guide.pb.go
+++ b/examples/route_guide/routeguide/route_guide.pb.go
@@ -156,7 +156,7 @@
 
 // This is a compile-time assertion to ensure that this generated file
 // is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion3
+const _ = grpc.SupportPackageIsVersion4
 
 // Client API for RouteGuide service
 
@@ -452,7 +452,7 @@
 			ClientStreams: true,
 		},
 	},
-	Metadata: fileDescriptor0,
+	Metadata: "route_guide.proto",
 }
 
 func init() { proto.RegisterFile("route_guide.proto", fileDescriptor0) }
diff --git a/grpclb/grpc_lb_v1/grpclb.pb.go b/grpclb/grpc_lb_v1/grpclb.pb.go
index da371e5..7be8947 100644
--- a/grpclb/grpc_lb_v1/grpclb.pb.go
+++ b/grpclb/grpc_lb_v1/grpclb.pb.go
@@ -420,7 +420,7 @@
 
 // This is a compile-time assertion to ensure that this generated file
 // is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion3
+const _ = grpc.SupportPackageIsVersion4
 
 // Client API for LoadBalancer service
 
@@ -517,7 +517,7 @@
 			ClientStreams: true,
 		},
 	},
-	Metadata: fileDescriptor0,
+	Metadata: "grpclb.proto",
 }
 
 func init() { proto.RegisterFile("grpclb.proto", fileDescriptor0) }
diff --git a/health/grpc_health_v1/health.pb.go b/health/grpc_health_v1/health.pb.go
index 0e6a910..89c4d45 100644
--- a/health/grpc_health_v1/health.pb.go
+++ b/health/grpc_health_v1/health.pb.go
@@ -90,7 +90,7 @@
 
 // This is a compile-time assertion to ensure that this generated file
 // is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion3
+const _ = grpc.SupportPackageIsVersion4
 
 // Client API for Health service
 
@@ -153,7 +153,7 @@
 		},
 	},
 	Streams:  []grpc.StreamDesc{},
-	Metadata: fileDescriptor0,
+	Metadata: "health.proto",
 }
 
 func init() { proto.RegisterFile("health.proto", fileDescriptor0) }
diff --git a/interop/grpc_testing/test.pb.go b/interop/grpc_testing/test.pb.go
index 54ead93..68b97c1 100755
--- a/interop/grpc_testing/test.pb.go
+++ b/interop/grpc_testing/test.pb.go
@@ -407,7 +407,7 @@
 
 // This is a compile-time assertion to ensure that this generated file
 // is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion3
+const _ = grpc.SupportPackageIsVersion4
 
 // Client API for TestService service
 
@@ -789,7 +789,7 @@
 			ClientStreams: true,
 		},
 	},
-	Metadata: fileDescriptor0,
+	Metadata: "test.proto",
 }
 
 func init() { proto.RegisterFile("test.proto", fileDescriptor0) }
diff --git a/reflection/grpc_reflection_v1alpha/reflection.pb.go b/reflection/grpc_reflection_v1alpha/reflection.pb.go
index da90479..76987a4 100644
--- a/reflection/grpc_reflection_v1alpha/reflection.pb.go
+++ b/reflection/grpc_reflection_v1alpha/reflection.pb.go
@@ -544,7 +544,7 @@
 
 // This is a compile-time assertion to ensure that this generated file
 // is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion3
+const _ = grpc.SupportPackageIsVersion4
 
 // Client API for ServerReflection service
 
@@ -643,7 +643,7 @@
 			ClientStreams: true,
 		},
 	},
-	Metadata: fileDescriptor0,
+	Metadata: "reflection.proto",
 }
 
 func init() { proto.RegisterFile("reflection.proto", fileDescriptor0) }
diff --git a/reflection/grpc_testing/test.pb.go b/reflection/grpc_testing/test.pb.go
index add7abd..607dfd3 100644
--- a/reflection/grpc_testing/test.pb.go
+++ b/reflection/grpc_testing/test.pb.go
@@ -66,7 +66,7 @@
 
 // This is a compile-time assertion to ensure that this generated file
 // is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion3
+const _ = grpc.SupportPackageIsVersion4
 
 // Client API for SearchService service
 
@@ -195,7 +195,7 @@
 			ClientStreams: true,
 		},
 	},
-	Metadata: fileDescriptor2,
+	Metadata: "test.proto",
 }
 
 func init() { proto.RegisterFile("test.proto", fileDescriptor2) }
diff --git a/reflection/serverreflection.go b/reflection/serverreflection.go
index 686090a..4b3fcf5 100644
--- a/reflection/serverreflection.go
+++ b/reflection/serverreflection.go
@@ -251,11 +251,12 @@
 		}
 
 		// 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
diff --git a/rpc_util.go b/rpc_util.go
index 6b60095..a25eaa8 100644
--- a/rpc_util.go
+++ b/rpc_util.go
@@ -448,10 +448,10 @@
 	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
diff --git a/stress/grpc_testing/metrics.pb.go b/stress/grpc_testing/metrics.pb.go
index 4ad4ccd..a1310b5 100644
--- a/stress/grpc_testing/metrics.pb.go
+++ b/stress/grpc_testing/metrics.pb.go
@@ -205,7 +205,7 @@
 
 // This is a compile-time assertion to ensure that this generated file
 // is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion3
+const _ = grpc.SupportPackageIsVersion4
 
 // Client API for MetricsService service
 
@@ -335,7 +335,7 @@
 			ServerStreams: true,
 		},
 	},
-	Metadata: fileDescriptor0,
+	Metadata: "metrics.proto",
 }
 
 func init() { proto.RegisterFile("metrics.proto", fileDescriptor0) }
diff --git a/test/grpc_testing/test.pb.go b/test/grpc_testing/test.pb.go
index 0ceb12d..e584c4d 100644
--- a/test/grpc_testing/test.pb.go
+++ b/test/grpc_testing/test.pb.go
@@ -360,7 +360,7 @@
 
 // This is a compile-time assertion to ensure that this generated file
 // is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion3
+const _ = grpc.SupportPackageIsVersion4
 
 // Client API for TestService service
 
@@ -742,7 +742,7 @@
 			ClientStreams: true,
 		},
 	},
-	Metadata: fileDescriptor0,
+	Metadata: "test.proto",
 }
 
 func init() { proto.RegisterFile("test.proto", fileDescriptor0) }