[VOL-5486] Fix deprecated versions
Change-Id: I3e03ea246020547ae75fa92ce8cf5cbba7e8f3bb
Signed-off-by: Abhay Kumar <abhay.kumar@radisys.com>
diff --git a/vendor/google.golang.org/grpc/reflection/README.md b/vendor/google.golang.org/grpc/reflection/README.md
index 04b6371..9ace83c 100644
--- a/vendor/google.golang.org/grpc/reflection/README.md
+++ b/vendor/google.golang.org/grpc/reflection/README.md
@@ -2,7 +2,7 @@
Package reflection implements server reflection service.
-The service implemented is defined in: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1alpha/reflection.proto.
+The service implemented is defined in: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto.
To register server reflection on a gRPC server:
```go
diff --git a/vendor/google.golang.org/grpc/reflection/adapt.go b/vendor/google.golang.org/grpc/reflection/adapt.go
new file mode 100644
index 0000000..6997e47
--- /dev/null
+++ b/vendor/google.golang.org/grpc/reflection/adapt.go
@@ -0,0 +1,57 @@
+/*
+ *
+ * Copyright 2023 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package reflection
+
+import (
+ "google.golang.org/grpc/reflection/internal"
+
+ v1reflectiongrpc "google.golang.org/grpc/reflection/grpc_reflection_v1"
+ v1reflectionpb "google.golang.org/grpc/reflection/grpc_reflection_v1"
+ v1alphareflectiongrpc "google.golang.org/grpc/reflection/grpc_reflection_v1alpha"
+)
+
+// asV1Alpha returns an implementation of the v1alpha version of the reflection
+// interface that delegates all calls to the given v1 version.
+func asV1Alpha(svr v1reflectiongrpc.ServerReflectionServer) v1alphareflectiongrpc.ServerReflectionServer {
+ return v1AlphaServerImpl{svr: svr}
+}
+
+type v1AlphaServerImpl struct {
+ svr v1reflectiongrpc.ServerReflectionServer
+}
+
+func (s v1AlphaServerImpl) ServerReflectionInfo(stream v1alphareflectiongrpc.ServerReflection_ServerReflectionInfoServer) error {
+ return s.svr.ServerReflectionInfo(v1AlphaServerStreamAdapter{stream})
+}
+
+type v1AlphaServerStreamAdapter struct {
+ v1alphareflectiongrpc.ServerReflection_ServerReflectionInfoServer
+}
+
+func (s v1AlphaServerStreamAdapter) Send(response *v1reflectionpb.ServerReflectionResponse) error {
+ return s.ServerReflection_ServerReflectionInfoServer.Send(internal.V1ToV1AlphaResponse(response))
+}
+
+func (s v1AlphaServerStreamAdapter) Recv() (*v1reflectionpb.ServerReflectionRequest, error) {
+ resp, err := s.ServerReflection_ServerReflectionInfoServer.Recv()
+ if err != nil {
+ return nil, err
+ }
+ return internal.V1AlphaToV1Request(resp), nil
+}
diff --git a/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1/reflection.pb.go b/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1/reflection.pb.go
new file mode 100644
index 0000000..92f5292
--- /dev/null
+++ b/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1/reflection.pb.go
@@ -0,0 +1,777 @@
+// Copyright 2016 The gRPC Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Service exported by server reflection. A more complete description of how
+// server reflection works can be found at
+// https://github.com/grpc/grpc/blob/master/doc/server-reflection.md
+//
+// The canonical version of this proto can be found at
+// https://github.com/grpc/grpc-proto/blob/master/grpc/reflection/v1/reflection.proto
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.36.6
+// protoc v5.27.1
+// source: grpc/reflection/v1/reflection.proto
+
+package grpc_reflection_v1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+ unsafe "unsafe"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// The message sent by the client when calling ServerReflectionInfo method.
+type ServerReflectionRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
+ // To use reflection service, the client should set one of the following
+ // fields in message_request. The server distinguishes requests by their
+ // defined field and then handles them using corresponding methods.
+ //
+ // Types that are valid to be assigned to MessageRequest:
+ //
+ // *ServerReflectionRequest_FileByFilename
+ // *ServerReflectionRequest_FileContainingSymbol
+ // *ServerReflectionRequest_FileContainingExtension
+ // *ServerReflectionRequest_AllExtensionNumbersOfType
+ // *ServerReflectionRequest_ListServices
+ MessageRequest isServerReflectionRequest_MessageRequest `protobuf_oneof:"message_request"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ServerReflectionRequest) Reset() {
+ *x = ServerReflectionRequest{}
+ mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ServerReflectionRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ServerReflectionRequest) ProtoMessage() {}
+
+func (x *ServerReflectionRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ServerReflectionRequest.ProtoReflect.Descriptor instead.
+func (*ServerReflectionRequest) Descriptor() ([]byte, []int) {
+ return file_grpc_reflection_v1_reflection_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ServerReflectionRequest) GetHost() string {
+ if x != nil {
+ return x.Host
+ }
+ return ""
+}
+
+func (x *ServerReflectionRequest) GetMessageRequest() isServerReflectionRequest_MessageRequest {
+ if x != nil {
+ return x.MessageRequest
+ }
+ return nil
+}
+
+func (x *ServerReflectionRequest) GetFileByFilename() string {
+ if x != nil {
+ if x, ok := x.MessageRequest.(*ServerReflectionRequest_FileByFilename); ok {
+ return x.FileByFilename
+ }
+ }
+ return ""
+}
+
+func (x *ServerReflectionRequest) GetFileContainingSymbol() string {
+ if x != nil {
+ if x, ok := x.MessageRequest.(*ServerReflectionRequest_FileContainingSymbol); ok {
+ return x.FileContainingSymbol
+ }
+ }
+ return ""
+}
+
+func (x *ServerReflectionRequest) GetFileContainingExtension() *ExtensionRequest {
+ if x != nil {
+ if x, ok := x.MessageRequest.(*ServerReflectionRequest_FileContainingExtension); ok {
+ return x.FileContainingExtension
+ }
+ }
+ return nil
+}
+
+func (x *ServerReflectionRequest) GetAllExtensionNumbersOfType() string {
+ if x != nil {
+ if x, ok := x.MessageRequest.(*ServerReflectionRequest_AllExtensionNumbersOfType); ok {
+ return x.AllExtensionNumbersOfType
+ }
+ }
+ return ""
+}
+
+func (x *ServerReflectionRequest) GetListServices() string {
+ if x != nil {
+ if x, ok := x.MessageRequest.(*ServerReflectionRequest_ListServices); ok {
+ return x.ListServices
+ }
+ }
+ return ""
+}
+
+type isServerReflectionRequest_MessageRequest interface {
+ isServerReflectionRequest_MessageRequest()
+}
+
+type ServerReflectionRequest_FileByFilename struct {
+ // Find a proto file by the file name.
+ FileByFilename string `protobuf:"bytes,3,opt,name=file_by_filename,json=fileByFilename,proto3,oneof"`
+}
+
+type ServerReflectionRequest_FileContainingSymbol struct {
+ // Find the proto file that declares the given fully-qualified symbol name.
+ // This field should be a fully-qualified symbol name
+ // (e.g. <package>.<service>[.<method>] or <package>.<type>).
+ FileContainingSymbol string `protobuf:"bytes,4,opt,name=file_containing_symbol,json=fileContainingSymbol,proto3,oneof"`
+}
+
+type ServerReflectionRequest_FileContainingExtension struct {
+ // Find the proto file which defines an extension extending the given
+ // message type with the given field number.
+ FileContainingExtension *ExtensionRequest `protobuf:"bytes,5,opt,name=file_containing_extension,json=fileContainingExtension,proto3,oneof"`
+}
+
+type ServerReflectionRequest_AllExtensionNumbersOfType struct {
+ // Finds the tag numbers used by all known extensions of the given message
+ // type, and appends them to ExtensionNumberResponse in an undefined order.
+ // Its corresponding method is best-effort: it's not guaranteed that the
+ // reflection service will implement this method, and it's not guaranteed
+ // that this method will provide all extensions. Returns
+ // StatusCode::UNIMPLEMENTED if it's not implemented.
+ // This field should be a fully-qualified type name. The format is
+ // <package>.<type>
+ AllExtensionNumbersOfType string `protobuf:"bytes,6,opt,name=all_extension_numbers_of_type,json=allExtensionNumbersOfType,proto3,oneof"`
+}
+
+type ServerReflectionRequest_ListServices struct {
+ // List the full names of registered services. The content will not be
+ // checked.
+ ListServices string `protobuf:"bytes,7,opt,name=list_services,json=listServices,proto3,oneof"`
+}
+
+func (*ServerReflectionRequest_FileByFilename) isServerReflectionRequest_MessageRequest() {}
+
+func (*ServerReflectionRequest_FileContainingSymbol) isServerReflectionRequest_MessageRequest() {}
+
+func (*ServerReflectionRequest_FileContainingExtension) isServerReflectionRequest_MessageRequest() {}
+
+func (*ServerReflectionRequest_AllExtensionNumbersOfType) isServerReflectionRequest_MessageRequest() {
+}
+
+func (*ServerReflectionRequest_ListServices) isServerReflectionRequest_MessageRequest() {}
+
+// The type name and extension number sent by the client when requesting
+// file_containing_extension.
+type ExtensionRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Fully-qualified type name. The format should be <package>.<type>
+ ContainingType string `protobuf:"bytes,1,opt,name=containing_type,json=containingType,proto3" json:"containing_type,omitempty"`
+ ExtensionNumber int32 `protobuf:"varint,2,opt,name=extension_number,json=extensionNumber,proto3" json:"extension_number,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExtensionRequest) Reset() {
+ *x = ExtensionRequest{}
+ mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExtensionRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExtensionRequest) ProtoMessage() {}
+
+func (x *ExtensionRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[1]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExtensionRequest.ProtoReflect.Descriptor instead.
+func (*ExtensionRequest) Descriptor() ([]byte, []int) {
+ return file_grpc_reflection_v1_reflection_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ExtensionRequest) GetContainingType() string {
+ if x != nil {
+ return x.ContainingType
+ }
+ return ""
+}
+
+func (x *ExtensionRequest) GetExtensionNumber() int32 {
+ if x != nil {
+ return x.ExtensionNumber
+ }
+ return 0
+}
+
+// The message sent by the server to answer ServerReflectionInfo method.
+type ServerReflectionResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ValidHost string `protobuf:"bytes,1,opt,name=valid_host,json=validHost,proto3" json:"valid_host,omitempty"`
+ OriginalRequest *ServerReflectionRequest `protobuf:"bytes,2,opt,name=original_request,json=originalRequest,proto3" json:"original_request,omitempty"`
+ // The server sets one of the following fields according to the message_request
+ // in the request.
+ //
+ // Types that are valid to be assigned to MessageResponse:
+ //
+ // *ServerReflectionResponse_FileDescriptorResponse
+ // *ServerReflectionResponse_AllExtensionNumbersResponse
+ // *ServerReflectionResponse_ListServicesResponse
+ // *ServerReflectionResponse_ErrorResponse
+ MessageResponse isServerReflectionResponse_MessageResponse `protobuf_oneof:"message_response"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ServerReflectionResponse) Reset() {
+ *x = ServerReflectionResponse{}
+ mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ServerReflectionResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ServerReflectionResponse) ProtoMessage() {}
+
+func (x *ServerReflectionResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[2]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ServerReflectionResponse.ProtoReflect.Descriptor instead.
+func (*ServerReflectionResponse) Descriptor() ([]byte, []int) {
+ return file_grpc_reflection_v1_reflection_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ServerReflectionResponse) GetValidHost() string {
+ if x != nil {
+ return x.ValidHost
+ }
+ return ""
+}
+
+func (x *ServerReflectionResponse) GetOriginalRequest() *ServerReflectionRequest {
+ if x != nil {
+ return x.OriginalRequest
+ }
+ return nil
+}
+
+func (x *ServerReflectionResponse) GetMessageResponse() isServerReflectionResponse_MessageResponse {
+ if x != nil {
+ return x.MessageResponse
+ }
+ return nil
+}
+
+func (x *ServerReflectionResponse) GetFileDescriptorResponse() *FileDescriptorResponse {
+ if x != nil {
+ if x, ok := x.MessageResponse.(*ServerReflectionResponse_FileDescriptorResponse); ok {
+ return x.FileDescriptorResponse
+ }
+ }
+ return nil
+}
+
+func (x *ServerReflectionResponse) GetAllExtensionNumbersResponse() *ExtensionNumberResponse {
+ if x != nil {
+ if x, ok := x.MessageResponse.(*ServerReflectionResponse_AllExtensionNumbersResponse); ok {
+ return x.AllExtensionNumbersResponse
+ }
+ }
+ return nil
+}
+
+func (x *ServerReflectionResponse) GetListServicesResponse() *ListServiceResponse {
+ if x != nil {
+ if x, ok := x.MessageResponse.(*ServerReflectionResponse_ListServicesResponse); ok {
+ return x.ListServicesResponse
+ }
+ }
+ return nil
+}
+
+func (x *ServerReflectionResponse) GetErrorResponse() *ErrorResponse {
+ if x != nil {
+ if x, ok := x.MessageResponse.(*ServerReflectionResponse_ErrorResponse); ok {
+ return x.ErrorResponse
+ }
+ }
+ return nil
+}
+
+type isServerReflectionResponse_MessageResponse interface {
+ isServerReflectionResponse_MessageResponse()
+}
+
+type ServerReflectionResponse_FileDescriptorResponse struct {
+ // This message is used to answer file_by_filename, file_containing_symbol,
+ // file_containing_extension requests with transitive dependencies.
+ // As the repeated label is not allowed in oneof fields, we use a
+ // FileDescriptorResponse message to encapsulate the repeated fields.
+ // The reflection service is allowed to avoid sending FileDescriptorProtos
+ // that were previously sent in response to earlier requests in the stream.
+ FileDescriptorResponse *FileDescriptorResponse `protobuf:"bytes,4,opt,name=file_descriptor_response,json=fileDescriptorResponse,proto3,oneof"`
+}
+
+type ServerReflectionResponse_AllExtensionNumbersResponse struct {
+ // This message is used to answer all_extension_numbers_of_type requests.
+ AllExtensionNumbersResponse *ExtensionNumberResponse `protobuf:"bytes,5,opt,name=all_extension_numbers_response,json=allExtensionNumbersResponse,proto3,oneof"`
+}
+
+type ServerReflectionResponse_ListServicesResponse struct {
+ // This message is used to answer list_services requests.
+ ListServicesResponse *ListServiceResponse `protobuf:"bytes,6,opt,name=list_services_response,json=listServicesResponse,proto3,oneof"`
+}
+
+type ServerReflectionResponse_ErrorResponse struct {
+ // This message is used when an error occurs.
+ ErrorResponse *ErrorResponse `protobuf:"bytes,7,opt,name=error_response,json=errorResponse,proto3,oneof"`
+}
+
+func (*ServerReflectionResponse_FileDescriptorResponse) isServerReflectionResponse_MessageResponse() {
+}
+
+func (*ServerReflectionResponse_AllExtensionNumbersResponse) isServerReflectionResponse_MessageResponse() {
+}
+
+func (*ServerReflectionResponse_ListServicesResponse) isServerReflectionResponse_MessageResponse() {}
+
+func (*ServerReflectionResponse_ErrorResponse) isServerReflectionResponse_MessageResponse() {}
+
+// Serialized FileDescriptorProto messages sent by the server answering
+// a file_by_filename, file_containing_symbol, or file_containing_extension
+// request.
+type FileDescriptorResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Serialized FileDescriptorProto messages. We avoid taking a dependency on
+ // descriptor.proto, which uses proto2 only features, by making them opaque
+ // bytes instead.
+ FileDescriptorProto [][]byte `protobuf:"bytes,1,rep,name=file_descriptor_proto,json=fileDescriptorProto,proto3" json:"file_descriptor_proto,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *FileDescriptorResponse) Reset() {
+ *x = FileDescriptorResponse{}
+ mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *FileDescriptorResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FileDescriptorResponse) ProtoMessage() {}
+
+func (x *FileDescriptorResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[3]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FileDescriptorResponse.ProtoReflect.Descriptor instead.
+func (*FileDescriptorResponse) Descriptor() ([]byte, []int) {
+ return file_grpc_reflection_v1_reflection_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *FileDescriptorResponse) GetFileDescriptorProto() [][]byte {
+ if x != nil {
+ return x.FileDescriptorProto
+ }
+ return nil
+}
+
+// A list of extension numbers sent by the server answering
+// all_extension_numbers_of_type request.
+type ExtensionNumberResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Full name of the base type, including the package name. The format
+ // is <package>.<type>
+ BaseTypeName string `protobuf:"bytes,1,opt,name=base_type_name,json=baseTypeName,proto3" json:"base_type_name,omitempty"`
+ ExtensionNumber []int32 `protobuf:"varint,2,rep,packed,name=extension_number,json=extensionNumber,proto3" json:"extension_number,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExtensionNumberResponse) Reset() {
+ *x = ExtensionNumberResponse{}
+ mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExtensionNumberResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExtensionNumberResponse) ProtoMessage() {}
+
+func (x *ExtensionNumberResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[4]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExtensionNumberResponse.ProtoReflect.Descriptor instead.
+func (*ExtensionNumberResponse) Descriptor() ([]byte, []int) {
+ return file_grpc_reflection_v1_reflection_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *ExtensionNumberResponse) GetBaseTypeName() string {
+ if x != nil {
+ return x.BaseTypeName
+ }
+ return ""
+}
+
+func (x *ExtensionNumberResponse) GetExtensionNumber() []int32 {
+ if x != nil {
+ return x.ExtensionNumber
+ }
+ return nil
+}
+
+// A list of ServiceResponse sent by the server answering list_services request.
+type ListServiceResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The information of each service may be expanded in the future, so we use
+ // ServiceResponse message to encapsulate it.
+ Service []*ServiceResponse `protobuf:"bytes,1,rep,name=service,proto3" json:"service,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ListServiceResponse) Reset() {
+ *x = ListServiceResponse{}
+ mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ListServiceResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListServiceResponse) ProtoMessage() {}
+
+func (x *ListServiceResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[5]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListServiceResponse.ProtoReflect.Descriptor instead.
+func (*ListServiceResponse) Descriptor() ([]byte, []int) {
+ return file_grpc_reflection_v1_reflection_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *ListServiceResponse) GetService() []*ServiceResponse {
+ if x != nil {
+ return x.Service
+ }
+ return nil
+}
+
+// The information of a single service used by ListServiceResponse to answer
+// list_services request.
+type ServiceResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Full name of a registered service, including its package name. The format
+ // is <package>.<service>
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ServiceResponse) Reset() {
+ *x = ServiceResponse{}
+ mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ServiceResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ServiceResponse) ProtoMessage() {}
+
+func (x *ServiceResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[6]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ServiceResponse.ProtoReflect.Descriptor instead.
+func (*ServiceResponse) Descriptor() ([]byte, []int) {
+ return file_grpc_reflection_v1_reflection_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *ServiceResponse) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+// The error code and error message sent by the server when an error occurs.
+type ErrorResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // This field uses the error codes defined in grpc::StatusCode.
+ ErrorCode int32 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"`
+ ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ErrorResponse) Reset() {
+ *x = ErrorResponse{}
+ mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ErrorResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ErrorResponse) ProtoMessage() {}
+
+func (x *ErrorResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[7]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ErrorResponse.ProtoReflect.Descriptor instead.
+func (*ErrorResponse) Descriptor() ([]byte, []int) {
+ return file_grpc_reflection_v1_reflection_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *ErrorResponse) GetErrorCode() int32 {
+ if x != nil {
+ return x.ErrorCode
+ }
+ return 0
+}
+
+func (x *ErrorResponse) GetErrorMessage() string {
+ if x != nil {
+ return x.ErrorMessage
+ }
+ return ""
+}
+
+var File_grpc_reflection_v1_reflection_proto protoreflect.FileDescriptor
+
+const file_grpc_reflection_v1_reflection_proto_rawDesc = "" +
+ "\n" +
+ "#grpc/reflection/v1/reflection.proto\x12\x12grpc.reflection.v1\"\xf3\x02\n" +
+ "\x17ServerReflectionRequest\x12\x12\n" +
+ "\x04host\x18\x01 \x01(\tR\x04host\x12*\n" +
+ "\x10file_by_filename\x18\x03 \x01(\tH\x00R\x0efileByFilename\x126\n" +
+ "\x16file_containing_symbol\x18\x04 \x01(\tH\x00R\x14fileContainingSymbol\x12b\n" +
+ "\x19file_containing_extension\x18\x05 \x01(\v2$.grpc.reflection.v1.ExtensionRequestH\x00R\x17fileContainingExtension\x12B\n" +
+ "\x1dall_extension_numbers_of_type\x18\x06 \x01(\tH\x00R\x19allExtensionNumbersOfType\x12%\n" +
+ "\rlist_services\x18\a \x01(\tH\x00R\flistServicesB\x11\n" +
+ "\x0fmessage_request\"f\n" +
+ "\x10ExtensionRequest\x12'\n" +
+ "\x0fcontaining_type\x18\x01 \x01(\tR\x0econtainingType\x12)\n" +
+ "\x10extension_number\x18\x02 \x01(\x05R\x0fextensionNumber\"\xae\x04\n" +
+ "\x18ServerReflectionResponse\x12\x1d\n" +
+ "\n" +
+ "valid_host\x18\x01 \x01(\tR\tvalidHost\x12V\n" +
+ "\x10original_request\x18\x02 \x01(\v2+.grpc.reflection.v1.ServerReflectionRequestR\x0foriginalRequest\x12f\n" +
+ "\x18file_descriptor_response\x18\x04 \x01(\v2*.grpc.reflection.v1.FileDescriptorResponseH\x00R\x16fileDescriptorResponse\x12r\n" +
+ "\x1eall_extension_numbers_response\x18\x05 \x01(\v2+.grpc.reflection.v1.ExtensionNumberResponseH\x00R\x1ballExtensionNumbersResponse\x12_\n" +
+ "\x16list_services_response\x18\x06 \x01(\v2'.grpc.reflection.v1.ListServiceResponseH\x00R\x14listServicesResponse\x12J\n" +
+ "\x0eerror_response\x18\a \x01(\v2!.grpc.reflection.v1.ErrorResponseH\x00R\rerrorResponseB\x12\n" +
+ "\x10message_response\"L\n" +
+ "\x16FileDescriptorResponse\x122\n" +
+ "\x15file_descriptor_proto\x18\x01 \x03(\fR\x13fileDescriptorProto\"j\n" +
+ "\x17ExtensionNumberResponse\x12$\n" +
+ "\x0ebase_type_name\x18\x01 \x01(\tR\fbaseTypeName\x12)\n" +
+ "\x10extension_number\x18\x02 \x03(\x05R\x0fextensionNumber\"T\n" +
+ "\x13ListServiceResponse\x12=\n" +
+ "\aservice\x18\x01 \x03(\v2#.grpc.reflection.v1.ServiceResponseR\aservice\"%\n" +
+ "\x0fServiceResponse\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\"S\n" +
+ "\rErrorResponse\x12\x1d\n" +
+ "\n" +
+ "error_code\x18\x01 \x01(\x05R\terrorCode\x12#\n" +
+ "\rerror_message\x18\x02 \x01(\tR\ferrorMessage2\x89\x01\n" +
+ "\x10ServerReflection\x12u\n" +
+ "\x14ServerReflectionInfo\x12+.grpc.reflection.v1.ServerReflectionRequest\x1a,.grpc.reflection.v1.ServerReflectionResponse(\x010\x01Bf\n" +
+ "\x15io.grpc.reflection.v1B\x15ServerReflectionProtoP\x01Z4google.golang.org/grpc/reflection/grpc_reflection_v1b\x06proto3"
+
+var (
+ file_grpc_reflection_v1_reflection_proto_rawDescOnce sync.Once
+ file_grpc_reflection_v1_reflection_proto_rawDescData []byte
+)
+
+func file_grpc_reflection_v1_reflection_proto_rawDescGZIP() []byte {
+ file_grpc_reflection_v1_reflection_proto_rawDescOnce.Do(func() {
+ file_grpc_reflection_v1_reflection_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_grpc_reflection_v1_reflection_proto_rawDesc), len(file_grpc_reflection_v1_reflection_proto_rawDesc)))
+ })
+ return file_grpc_reflection_v1_reflection_proto_rawDescData
+}
+
+var file_grpc_reflection_v1_reflection_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
+var file_grpc_reflection_v1_reflection_proto_goTypes = []any{
+ (*ServerReflectionRequest)(nil), // 0: grpc.reflection.v1.ServerReflectionRequest
+ (*ExtensionRequest)(nil), // 1: grpc.reflection.v1.ExtensionRequest
+ (*ServerReflectionResponse)(nil), // 2: grpc.reflection.v1.ServerReflectionResponse
+ (*FileDescriptorResponse)(nil), // 3: grpc.reflection.v1.FileDescriptorResponse
+ (*ExtensionNumberResponse)(nil), // 4: grpc.reflection.v1.ExtensionNumberResponse
+ (*ListServiceResponse)(nil), // 5: grpc.reflection.v1.ListServiceResponse
+ (*ServiceResponse)(nil), // 6: grpc.reflection.v1.ServiceResponse
+ (*ErrorResponse)(nil), // 7: grpc.reflection.v1.ErrorResponse
+}
+var file_grpc_reflection_v1_reflection_proto_depIdxs = []int32{
+ 1, // 0: grpc.reflection.v1.ServerReflectionRequest.file_containing_extension:type_name -> grpc.reflection.v1.ExtensionRequest
+ 0, // 1: grpc.reflection.v1.ServerReflectionResponse.original_request:type_name -> grpc.reflection.v1.ServerReflectionRequest
+ 3, // 2: grpc.reflection.v1.ServerReflectionResponse.file_descriptor_response:type_name -> grpc.reflection.v1.FileDescriptorResponse
+ 4, // 3: grpc.reflection.v1.ServerReflectionResponse.all_extension_numbers_response:type_name -> grpc.reflection.v1.ExtensionNumberResponse
+ 5, // 4: grpc.reflection.v1.ServerReflectionResponse.list_services_response:type_name -> grpc.reflection.v1.ListServiceResponse
+ 7, // 5: grpc.reflection.v1.ServerReflectionResponse.error_response:type_name -> grpc.reflection.v1.ErrorResponse
+ 6, // 6: grpc.reflection.v1.ListServiceResponse.service:type_name -> grpc.reflection.v1.ServiceResponse
+ 0, // 7: grpc.reflection.v1.ServerReflection.ServerReflectionInfo:input_type -> grpc.reflection.v1.ServerReflectionRequest
+ 2, // 8: grpc.reflection.v1.ServerReflection.ServerReflectionInfo:output_type -> grpc.reflection.v1.ServerReflectionResponse
+ 8, // [8:9] is the sub-list for method output_type
+ 7, // [7:8] is the sub-list for method input_type
+ 7, // [7:7] is the sub-list for extension type_name
+ 7, // [7:7] is the sub-list for extension extendee
+ 0, // [0:7] is the sub-list for field type_name
+}
+
+func init() { file_grpc_reflection_v1_reflection_proto_init() }
+func file_grpc_reflection_v1_reflection_proto_init() {
+ if File_grpc_reflection_v1_reflection_proto != nil {
+ return
+ }
+ file_grpc_reflection_v1_reflection_proto_msgTypes[0].OneofWrappers = []any{
+ (*ServerReflectionRequest_FileByFilename)(nil),
+ (*ServerReflectionRequest_FileContainingSymbol)(nil),
+ (*ServerReflectionRequest_FileContainingExtension)(nil),
+ (*ServerReflectionRequest_AllExtensionNumbersOfType)(nil),
+ (*ServerReflectionRequest_ListServices)(nil),
+ }
+ file_grpc_reflection_v1_reflection_proto_msgTypes[2].OneofWrappers = []any{
+ (*ServerReflectionResponse_FileDescriptorResponse)(nil),
+ (*ServerReflectionResponse_AllExtensionNumbersResponse)(nil),
+ (*ServerReflectionResponse_ListServicesResponse)(nil),
+ (*ServerReflectionResponse_ErrorResponse)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_grpc_reflection_v1_reflection_proto_rawDesc), len(file_grpc_reflection_v1_reflection_proto_rawDesc)),
+ NumEnums: 0,
+ NumMessages: 8,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_grpc_reflection_v1_reflection_proto_goTypes,
+ DependencyIndexes: file_grpc_reflection_v1_reflection_proto_depIdxs,
+ MessageInfos: file_grpc_reflection_v1_reflection_proto_msgTypes,
+ }.Build()
+ File_grpc_reflection_v1_reflection_proto = out.File
+ file_grpc_reflection_v1_reflection_proto_goTypes = nil
+ file_grpc_reflection_v1_reflection_proto_depIdxs = nil
+}
diff --git a/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1/reflection_grpc.pb.go b/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1/reflection_grpc.pb.go
new file mode 100644
index 0000000..f4a361c
--- /dev/null
+++ b/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1/reflection_grpc.pb.go
@@ -0,0 +1,138 @@
+// Copyright 2016 The gRPC Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Service exported by server reflection. A more complete description of how
+// server reflection works can be found at
+// https://github.com/grpc/grpc/blob/master/doc/server-reflection.md
+//
+// The canonical version of this proto can be found at
+// https://github.com/grpc/grpc-proto/blob/master/grpc/reflection/v1/reflection.proto
+
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.5.1
+// - protoc v5.27.1
+// source: grpc/reflection/v1/reflection.proto
+
+package grpc_reflection_v1
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ ServerReflection_ServerReflectionInfo_FullMethodName = "/grpc.reflection.v1.ServerReflection/ServerReflectionInfo"
+)
+
+// ServerReflectionClient is the client API for ServerReflection service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type ServerReflectionClient interface {
+ // The reflection service is structured as a bidirectional stream, ensuring
+ // all related requests go to a single server.
+ ServerReflectionInfo(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ServerReflectionRequest, ServerReflectionResponse], error)
+}
+
+type serverReflectionClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewServerReflectionClient(cc grpc.ClientConnInterface) ServerReflectionClient {
+ return &serverReflectionClient{cc}
+}
+
+func (c *serverReflectionClient) ServerReflectionInfo(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ServerReflectionRequest, ServerReflectionResponse], error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &ServerReflection_ServiceDesc.Streams[0], ServerReflection_ServerReflectionInfo_FullMethodName, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &grpc.GenericClientStream[ServerReflectionRequest, ServerReflectionResponse]{ClientStream: stream}
+ return x, nil
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type ServerReflection_ServerReflectionInfoClient = grpc.BidiStreamingClient[ServerReflectionRequest, ServerReflectionResponse]
+
+// ServerReflectionServer is the server API for ServerReflection service.
+// All implementations should embed UnimplementedServerReflectionServer
+// for forward compatibility.
+type ServerReflectionServer interface {
+ // The reflection service is structured as a bidirectional stream, ensuring
+ // all related requests go to a single server.
+ ServerReflectionInfo(grpc.BidiStreamingServer[ServerReflectionRequest, ServerReflectionResponse]) error
+}
+
+// UnimplementedServerReflectionServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedServerReflectionServer struct{}
+
+func (UnimplementedServerReflectionServer) ServerReflectionInfo(grpc.BidiStreamingServer[ServerReflectionRequest, ServerReflectionResponse]) error {
+ return status.Error(codes.Unimplemented, "method ServerReflectionInfo not implemented")
+}
+func (UnimplementedServerReflectionServer) testEmbeddedByValue() {}
+
+// UnsafeServerReflectionServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to ServerReflectionServer will
+// result in compilation errors.
+type UnsafeServerReflectionServer interface {
+ mustEmbedUnimplementedServerReflectionServer()
+}
+
+func RegisterServerReflectionServer(s grpc.ServiceRegistrar, srv ServerReflectionServer) {
+ // If the following call panics, it indicates UnimplementedServerReflectionServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
+ s.RegisterService(&ServerReflection_ServiceDesc, srv)
+}
+
+func _ServerReflection_ServerReflectionInfo_Handler(srv interface{}, stream grpc.ServerStream) error {
+ return srv.(ServerReflectionServer).ServerReflectionInfo(&grpc.GenericServerStream[ServerReflectionRequest, ServerReflectionResponse]{ServerStream: stream})
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type ServerReflection_ServerReflectionInfoServer = grpc.BidiStreamingServer[ServerReflectionRequest, ServerReflectionResponse]
+
+// ServerReflection_ServiceDesc is the grpc.ServiceDesc for ServerReflection service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var ServerReflection_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "grpc.reflection.v1.ServerReflection",
+ HandlerType: (*ServerReflectionServer)(nil),
+ Methods: []grpc.MethodDesc{},
+ Streams: []grpc.StreamDesc{
+ {
+ StreamName: "ServerReflectionInfo",
+ Handler: _ServerReflection_ServerReflectionInfo_Handler,
+ ServerStreams: true,
+ ClientStreams: true,
+ },
+ },
+ Metadata: "grpc/reflection/v1/reflection.proto",
+}
diff --git a/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.pb.go b/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.pb.go
index 0a12ad2..5253e86 100644
--- a/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.pb.go
+++ b/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.pb.go
@@ -1,76 +1,158 @@
+// Copyright 2016 The gRPC Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// Service exported by server reflection
+
+// Warning: this entire file is deprecated. Use this instead:
+// https://github.com/grpc/grpc-proto/blob/master/grpc/reflection/v1/reflection.proto
+
// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: grpc_reflection_v1alpha/reflection.proto
+// versions:
+// protoc-gen-go v1.36.6
+// protoc v5.27.1
+// grpc/reflection/v1alpha/reflection.proto is a deprecated file.
package grpc_reflection_v1alpha
import (
- context "context"
- fmt "fmt"
- proto "github.com/golang/protobuf/proto"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- math "math"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+ unsafe "unsafe"
)
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
// The message sent by the client when calling ServerReflectionInfo method.
+//
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
type ServerReflectionRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
// To use reflection service, the client should set one of the following
// fields in message_request. The server distinguishes requests by their
// defined field and then handles them using corresponding methods.
//
// Types that are valid to be assigned to MessageRequest:
+ //
// *ServerReflectionRequest_FileByFilename
// *ServerReflectionRequest_FileContainingSymbol
// *ServerReflectionRequest_FileContainingExtension
// *ServerReflectionRequest_AllExtensionNumbersOfType
// *ServerReflectionRequest_ListServices
- MessageRequest isServerReflectionRequest_MessageRequest `protobuf_oneof:"message_request"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ MessageRequest isServerReflectionRequest_MessageRequest `protobuf_oneof:"message_request"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (m *ServerReflectionRequest) Reset() { *m = ServerReflectionRequest{} }
-func (m *ServerReflectionRequest) String() string { return proto.CompactTextString(m) }
-func (*ServerReflectionRequest) ProtoMessage() {}
+func (x *ServerReflectionRequest) Reset() {
+ *x = ServerReflectionRequest{}
+ mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ServerReflectionRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ServerReflectionRequest) ProtoMessage() {}
+
+func (x *ServerReflectionRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ServerReflectionRequest.ProtoReflect.Descriptor instead.
func (*ServerReflectionRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_42a8ac412db3cb03, []int{0}
+ return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{0}
}
-func (m *ServerReflectionRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ServerReflectionRequest.Unmarshal(m, b)
-}
-func (m *ServerReflectionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ServerReflectionRequest.Marshal(b, m, deterministic)
-}
-func (m *ServerReflectionRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ServerReflectionRequest.Merge(m, src)
-}
-func (m *ServerReflectionRequest) XXX_Size() int {
- return xxx_messageInfo_ServerReflectionRequest.Size(m)
-}
-func (m *ServerReflectionRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_ServerReflectionRequest.DiscardUnknown(m)
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+func (x *ServerReflectionRequest) GetHost() string {
+ if x != nil {
+ return x.Host
+ }
+ return ""
}
-var xxx_messageInfo_ServerReflectionRequest proto.InternalMessageInfo
+func (x *ServerReflectionRequest) GetMessageRequest() isServerReflectionRequest_MessageRequest {
+ if x != nil {
+ return x.MessageRequest
+ }
+ return nil
+}
-func (m *ServerReflectionRequest) GetHost() string {
- if m != nil {
- return m.Host
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+func (x *ServerReflectionRequest) GetFileByFilename() string {
+ if x != nil {
+ if x, ok := x.MessageRequest.(*ServerReflectionRequest_FileByFilename); ok {
+ return x.FileByFilename
+ }
+ }
+ return ""
+}
+
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+func (x *ServerReflectionRequest) GetFileContainingSymbol() string {
+ if x != nil {
+ if x, ok := x.MessageRequest.(*ServerReflectionRequest_FileContainingSymbol); ok {
+ return x.FileContainingSymbol
+ }
+ }
+ return ""
+}
+
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+func (x *ServerReflectionRequest) GetFileContainingExtension() *ExtensionRequest {
+ if x != nil {
+ if x, ok := x.MessageRequest.(*ServerReflectionRequest_FileContainingExtension); ok {
+ return x.FileContainingExtension
+ }
+ }
+ return nil
+}
+
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+func (x *ServerReflectionRequest) GetAllExtensionNumbersOfType() string {
+ if x != nil {
+ if x, ok := x.MessageRequest.(*ServerReflectionRequest_AllExtensionNumbersOfType); ok {
+ return x.AllExtensionNumbersOfType
+ }
+ }
+ return ""
+}
+
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+func (x *ServerReflectionRequest) GetListServices() string {
+ if x != nil {
+ if x, ok := x.MessageRequest.(*ServerReflectionRequest_ListServices); ok {
+ return x.ListServices
+ }
}
return ""
}
@@ -80,22 +162,48 @@
}
type ServerReflectionRequest_FileByFilename struct {
+ // Find a proto file by the file name.
+ //
+ // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
FileByFilename string `protobuf:"bytes,3,opt,name=file_by_filename,json=fileByFilename,proto3,oneof"`
}
type ServerReflectionRequest_FileContainingSymbol struct {
+ // Find the proto file that declares the given fully-qualified symbol name.
+ // This field should be a fully-qualified symbol name
+ // (e.g. <package>.<service>[.<method>] or <package>.<type>).
+ //
+ // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
FileContainingSymbol string `protobuf:"bytes,4,opt,name=file_containing_symbol,json=fileContainingSymbol,proto3,oneof"`
}
type ServerReflectionRequest_FileContainingExtension struct {
+ // Find the proto file which defines an extension extending the given
+ // message type with the given field number.
+ //
+ // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
FileContainingExtension *ExtensionRequest `protobuf:"bytes,5,opt,name=file_containing_extension,json=fileContainingExtension,proto3,oneof"`
}
type ServerReflectionRequest_AllExtensionNumbersOfType struct {
+ // Finds the tag numbers used by all known extensions of extendee_type, and
+ // appends them to ExtensionNumberResponse in an undefined order.
+ // Its corresponding method is best-effort: it's not guaranteed that the
+ // reflection service will implement this method, and it's not guaranteed
+ // that this method will provide all extensions. Returns
+ // StatusCode::UNIMPLEMENTED if it's not implemented.
+ // This field should be a fully-qualified type name. The format is
+ // <package>.<type>
+ //
+ // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
AllExtensionNumbersOfType string `protobuf:"bytes,6,opt,name=all_extension_numbers_of_type,json=allExtensionNumbersOfType,proto3,oneof"`
}
type ServerReflectionRequest_ListServices struct {
+ // List the full names of registered services. The content will not be
+ // checked.
+ //
+ // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
ListServices string `protobuf:"bytes,7,opt,name=list_services,json=listServices,proto3,oneof"`
}
@@ -105,166 +213,185 @@
func (*ServerReflectionRequest_FileContainingExtension) isServerReflectionRequest_MessageRequest() {}
-func (*ServerReflectionRequest_AllExtensionNumbersOfType) isServerReflectionRequest_MessageRequest() {}
+func (*ServerReflectionRequest_AllExtensionNumbersOfType) isServerReflectionRequest_MessageRequest() {
+}
func (*ServerReflectionRequest_ListServices) isServerReflectionRequest_MessageRequest() {}
-func (m *ServerReflectionRequest) GetMessageRequest() isServerReflectionRequest_MessageRequest {
- if m != nil {
- return m.MessageRequest
- }
- return nil
-}
-
-func (m *ServerReflectionRequest) GetFileByFilename() string {
- if x, ok := m.GetMessageRequest().(*ServerReflectionRequest_FileByFilename); ok {
- return x.FileByFilename
- }
- return ""
-}
-
-func (m *ServerReflectionRequest) GetFileContainingSymbol() string {
- if x, ok := m.GetMessageRequest().(*ServerReflectionRequest_FileContainingSymbol); ok {
- return x.FileContainingSymbol
- }
- return ""
-}
-
-func (m *ServerReflectionRequest) GetFileContainingExtension() *ExtensionRequest {
- if x, ok := m.GetMessageRequest().(*ServerReflectionRequest_FileContainingExtension); ok {
- return x.FileContainingExtension
- }
- return nil
-}
-
-func (m *ServerReflectionRequest) GetAllExtensionNumbersOfType() string {
- if x, ok := m.GetMessageRequest().(*ServerReflectionRequest_AllExtensionNumbersOfType); ok {
- return x.AllExtensionNumbersOfType
- }
- return ""
-}
-
-func (m *ServerReflectionRequest) GetListServices() string {
- if x, ok := m.GetMessageRequest().(*ServerReflectionRequest_ListServices); ok {
- return x.ListServices
- }
- return ""
-}
-
-// XXX_OneofWrappers is for the internal use of the proto package.
-func (*ServerReflectionRequest) XXX_OneofWrappers() []interface{} {
- return []interface{}{
- (*ServerReflectionRequest_FileByFilename)(nil),
- (*ServerReflectionRequest_FileContainingSymbol)(nil),
- (*ServerReflectionRequest_FileContainingExtension)(nil),
- (*ServerReflectionRequest_AllExtensionNumbersOfType)(nil),
- (*ServerReflectionRequest_ListServices)(nil),
- }
-}
-
// The type name and extension number sent by the client when requesting
// file_containing_extension.
+//
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
type ExtensionRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
// Fully-qualified type name. The format should be <package>.<type>
- ContainingType string `protobuf:"bytes,1,opt,name=containing_type,json=containingType,proto3" json:"containing_type,omitempty"`
- ExtensionNumber int32 `protobuf:"varint,2,opt,name=extension_number,json=extensionNumber,proto3" json:"extension_number,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ //
+ // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+ ContainingType string `protobuf:"bytes,1,opt,name=containing_type,json=containingType,proto3" json:"containing_type,omitempty"`
+ // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+ ExtensionNumber int32 `protobuf:"varint,2,opt,name=extension_number,json=extensionNumber,proto3" json:"extension_number,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (m *ExtensionRequest) Reset() { *m = ExtensionRequest{} }
-func (m *ExtensionRequest) String() string { return proto.CompactTextString(m) }
-func (*ExtensionRequest) ProtoMessage() {}
+func (x *ExtensionRequest) Reset() {
+ *x = ExtensionRequest{}
+ mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExtensionRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExtensionRequest) ProtoMessage() {}
+
+func (x *ExtensionRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[1]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExtensionRequest.ProtoReflect.Descriptor instead.
func (*ExtensionRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_42a8ac412db3cb03, []int{1}
+ return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{1}
}
-func (m *ExtensionRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ExtensionRequest.Unmarshal(m, b)
-}
-func (m *ExtensionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ExtensionRequest.Marshal(b, m, deterministic)
-}
-func (m *ExtensionRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ExtensionRequest.Merge(m, src)
-}
-func (m *ExtensionRequest) XXX_Size() int {
- return xxx_messageInfo_ExtensionRequest.Size(m)
-}
-func (m *ExtensionRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_ExtensionRequest.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ExtensionRequest proto.InternalMessageInfo
-
-func (m *ExtensionRequest) GetContainingType() string {
- if m != nil {
- return m.ContainingType
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+func (x *ExtensionRequest) GetContainingType() string {
+ if x != nil {
+ return x.ContainingType
}
return ""
}
-func (m *ExtensionRequest) GetExtensionNumber() int32 {
- if m != nil {
- return m.ExtensionNumber
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+func (x *ExtensionRequest) GetExtensionNumber() int32 {
+ if x != nil {
+ return x.ExtensionNumber
}
return 0
}
// The message sent by the server to answer ServerReflectionInfo method.
+//
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
type ServerReflectionResponse struct {
- ValidHost string `protobuf:"bytes,1,opt,name=valid_host,json=validHost,proto3" json:"valid_host,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+ ValidHost string `protobuf:"bytes,1,opt,name=valid_host,json=validHost,proto3" json:"valid_host,omitempty"`
+ // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
OriginalRequest *ServerReflectionRequest `protobuf:"bytes,2,opt,name=original_request,json=originalRequest,proto3" json:"original_request,omitempty"`
- // The server sets one of the following fields according to the
- // message_request in the request.
+ // The server set one of the following fields according to the message_request
+ // in the request.
//
// Types that are valid to be assigned to MessageResponse:
+ //
// *ServerReflectionResponse_FileDescriptorResponse
// *ServerReflectionResponse_AllExtensionNumbersResponse
// *ServerReflectionResponse_ListServicesResponse
// *ServerReflectionResponse_ErrorResponse
- MessageResponse isServerReflectionResponse_MessageResponse `protobuf_oneof:"message_response"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ MessageResponse isServerReflectionResponse_MessageResponse `protobuf_oneof:"message_response"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (m *ServerReflectionResponse) Reset() { *m = ServerReflectionResponse{} }
-func (m *ServerReflectionResponse) String() string { return proto.CompactTextString(m) }
-func (*ServerReflectionResponse) ProtoMessage() {}
+func (x *ServerReflectionResponse) Reset() {
+ *x = ServerReflectionResponse{}
+ mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ServerReflectionResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ServerReflectionResponse) ProtoMessage() {}
+
+func (x *ServerReflectionResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[2]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ServerReflectionResponse.ProtoReflect.Descriptor instead.
func (*ServerReflectionResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_42a8ac412db3cb03, []int{2}
+ return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{2}
}
-func (m *ServerReflectionResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ServerReflectionResponse.Unmarshal(m, b)
-}
-func (m *ServerReflectionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ServerReflectionResponse.Marshal(b, m, deterministic)
-}
-func (m *ServerReflectionResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ServerReflectionResponse.Merge(m, src)
-}
-func (m *ServerReflectionResponse) XXX_Size() int {
- return xxx_messageInfo_ServerReflectionResponse.Size(m)
-}
-func (m *ServerReflectionResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_ServerReflectionResponse.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ServerReflectionResponse proto.InternalMessageInfo
-
-func (m *ServerReflectionResponse) GetValidHost() string {
- if m != nil {
- return m.ValidHost
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+func (x *ServerReflectionResponse) GetValidHost() string {
+ if x != nil {
+ return x.ValidHost
}
return ""
}
-func (m *ServerReflectionResponse) GetOriginalRequest() *ServerReflectionRequest {
- if m != nil {
- return m.OriginalRequest
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+func (x *ServerReflectionResponse) GetOriginalRequest() *ServerReflectionRequest {
+ if x != nil {
+ return x.OriginalRequest
+ }
+ return nil
+}
+
+func (x *ServerReflectionResponse) GetMessageResponse() isServerReflectionResponse_MessageResponse {
+ if x != nil {
+ return x.MessageResponse
+ }
+ return nil
+}
+
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+func (x *ServerReflectionResponse) GetFileDescriptorResponse() *FileDescriptorResponse {
+ if x != nil {
+ if x, ok := x.MessageResponse.(*ServerReflectionResponse_FileDescriptorResponse); ok {
+ return x.FileDescriptorResponse
+ }
+ }
+ return nil
+}
+
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+func (x *ServerReflectionResponse) GetAllExtensionNumbersResponse() *ExtensionNumberResponse {
+ if x != nil {
+ if x, ok := x.MessageResponse.(*ServerReflectionResponse_AllExtensionNumbersResponse); ok {
+ return x.AllExtensionNumbersResponse
+ }
+ }
+ return nil
+}
+
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+func (x *ServerReflectionResponse) GetListServicesResponse() *ListServiceResponse {
+ if x != nil {
+ if x, ok := x.MessageResponse.(*ServerReflectionResponse_ListServicesResponse); ok {
+ return x.ListServicesResponse
+ }
+ }
+ return nil
+}
+
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+func (x *ServerReflectionResponse) GetErrorResponse() *ErrorResponse {
+ if x != nil {
+ if x, ok := x.MessageResponse.(*ServerReflectionResponse_ErrorResponse); ok {
+ return x.ErrorResponse
+ }
}
return nil
}
@@ -274,22 +401,40 @@
}
type ServerReflectionResponse_FileDescriptorResponse struct {
+ // This message is used to answer file_by_filename, file_containing_symbol,
+ // file_containing_extension requests with transitive dependencies. As
+ // the repeated label is not allowed in oneof fields, we use a
+ // FileDescriptorResponse message to encapsulate the repeated fields.
+ // The reflection service is allowed to avoid sending FileDescriptorProtos
+ // that were previously sent in response to earlier requests in the stream.
+ //
+ // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
FileDescriptorResponse *FileDescriptorResponse `protobuf:"bytes,4,opt,name=file_descriptor_response,json=fileDescriptorResponse,proto3,oneof"`
}
type ServerReflectionResponse_AllExtensionNumbersResponse struct {
+ // This message is used to answer all_extension_numbers_of_type request.
+ //
+ // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
AllExtensionNumbersResponse *ExtensionNumberResponse `protobuf:"bytes,5,opt,name=all_extension_numbers_response,json=allExtensionNumbersResponse,proto3,oneof"`
}
type ServerReflectionResponse_ListServicesResponse struct {
+ // This message is used to answer list_services request.
+ //
+ // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
ListServicesResponse *ListServiceResponse `protobuf:"bytes,6,opt,name=list_services_response,json=listServicesResponse,proto3,oneof"`
}
type ServerReflectionResponse_ErrorResponse struct {
+ // This message is used when an error occurs.
+ //
+ // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
ErrorResponse *ErrorResponse `protobuf:"bytes,7,opt,name=error_response,json=errorResponse,proto3,oneof"`
}
-func (*ServerReflectionResponse_FileDescriptorResponse) isServerReflectionResponse_MessageResponse() {}
+func (*ServerReflectionResponse_FileDescriptorResponse) isServerReflectionResponse_MessageResponse() {
+}
func (*ServerReflectionResponse_AllExtensionNumbersResponse) isServerReflectionResponse_MessageResponse() {
}
@@ -298,453 +443,405 @@
func (*ServerReflectionResponse_ErrorResponse) isServerReflectionResponse_MessageResponse() {}
-func (m *ServerReflectionResponse) GetMessageResponse() isServerReflectionResponse_MessageResponse {
- if m != nil {
- return m.MessageResponse
- }
- return nil
-}
-
-func (m *ServerReflectionResponse) GetFileDescriptorResponse() *FileDescriptorResponse {
- if x, ok := m.GetMessageResponse().(*ServerReflectionResponse_FileDescriptorResponse); ok {
- return x.FileDescriptorResponse
- }
- return nil
-}
-
-func (m *ServerReflectionResponse) GetAllExtensionNumbersResponse() *ExtensionNumberResponse {
- if x, ok := m.GetMessageResponse().(*ServerReflectionResponse_AllExtensionNumbersResponse); ok {
- return x.AllExtensionNumbersResponse
- }
- return nil
-}
-
-func (m *ServerReflectionResponse) GetListServicesResponse() *ListServiceResponse {
- if x, ok := m.GetMessageResponse().(*ServerReflectionResponse_ListServicesResponse); ok {
- return x.ListServicesResponse
- }
- return nil
-}
-
-func (m *ServerReflectionResponse) GetErrorResponse() *ErrorResponse {
- if x, ok := m.GetMessageResponse().(*ServerReflectionResponse_ErrorResponse); ok {
- return x.ErrorResponse
- }
- return nil
-}
-
-// XXX_OneofWrappers is for the internal use of the proto package.
-func (*ServerReflectionResponse) XXX_OneofWrappers() []interface{} {
- return []interface{}{
- (*ServerReflectionResponse_FileDescriptorResponse)(nil),
- (*ServerReflectionResponse_AllExtensionNumbersResponse)(nil),
- (*ServerReflectionResponse_ListServicesResponse)(nil),
- (*ServerReflectionResponse_ErrorResponse)(nil),
- }
-}
-
// Serialized FileDescriptorProto messages sent by the server answering
// a file_by_filename, file_containing_symbol, or file_containing_extension
// request.
+//
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
type FileDescriptorResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
// Serialized FileDescriptorProto messages. We avoid taking a dependency on
// descriptor.proto, which uses proto2 only features, by making them opaque
// bytes instead.
- FileDescriptorProto [][]byte `protobuf:"bytes,1,rep,name=file_descriptor_proto,json=fileDescriptorProto,proto3" json:"file_descriptor_proto,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ //
+ // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+ FileDescriptorProto [][]byte `protobuf:"bytes,1,rep,name=file_descriptor_proto,json=fileDescriptorProto,proto3" json:"file_descriptor_proto,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (m *FileDescriptorResponse) Reset() { *m = FileDescriptorResponse{} }
-func (m *FileDescriptorResponse) String() string { return proto.CompactTextString(m) }
-func (*FileDescriptorResponse) ProtoMessage() {}
+func (x *FileDescriptorResponse) Reset() {
+ *x = FileDescriptorResponse{}
+ mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *FileDescriptorResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FileDescriptorResponse) ProtoMessage() {}
+
+func (x *FileDescriptorResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[3]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FileDescriptorResponse.ProtoReflect.Descriptor instead.
func (*FileDescriptorResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_42a8ac412db3cb03, []int{3}
+ return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{3}
}
-func (m *FileDescriptorResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_FileDescriptorResponse.Unmarshal(m, b)
-}
-func (m *FileDescriptorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_FileDescriptorResponse.Marshal(b, m, deterministic)
-}
-func (m *FileDescriptorResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_FileDescriptorResponse.Merge(m, src)
-}
-func (m *FileDescriptorResponse) XXX_Size() int {
- return xxx_messageInfo_FileDescriptorResponse.Size(m)
-}
-func (m *FileDescriptorResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_FileDescriptorResponse.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_FileDescriptorResponse proto.InternalMessageInfo
-
-func (m *FileDescriptorResponse) GetFileDescriptorProto() [][]byte {
- if m != nil {
- return m.FileDescriptorProto
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+func (x *FileDescriptorResponse) GetFileDescriptorProto() [][]byte {
+ if x != nil {
+ return x.FileDescriptorProto
}
return nil
}
// A list of extension numbers sent by the server answering
// all_extension_numbers_of_type request.
+//
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
type ExtensionNumberResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
// Full name of the base type, including the package name. The format
// is <package>.<type>
- BaseTypeName string `protobuf:"bytes,1,opt,name=base_type_name,json=baseTypeName,proto3" json:"base_type_name,omitempty"`
- ExtensionNumber []int32 `protobuf:"varint,2,rep,packed,name=extension_number,json=extensionNumber,proto3" json:"extension_number,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ //
+ // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+ BaseTypeName string `protobuf:"bytes,1,opt,name=base_type_name,json=baseTypeName,proto3" json:"base_type_name,omitempty"`
+ // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+ ExtensionNumber []int32 `protobuf:"varint,2,rep,packed,name=extension_number,json=extensionNumber,proto3" json:"extension_number,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (m *ExtensionNumberResponse) Reset() { *m = ExtensionNumberResponse{} }
-func (m *ExtensionNumberResponse) String() string { return proto.CompactTextString(m) }
-func (*ExtensionNumberResponse) ProtoMessage() {}
+func (x *ExtensionNumberResponse) Reset() {
+ *x = ExtensionNumberResponse{}
+ mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExtensionNumberResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExtensionNumberResponse) ProtoMessage() {}
+
+func (x *ExtensionNumberResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[4]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExtensionNumberResponse.ProtoReflect.Descriptor instead.
func (*ExtensionNumberResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_42a8ac412db3cb03, []int{4}
+ return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{4}
}
-func (m *ExtensionNumberResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ExtensionNumberResponse.Unmarshal(m, b)
-}
-func (m *ExtensionNumberResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ExtensionNumberResponse.Marshal(b, m, deterministic)
-}
-func (m *ExtensionNumberResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ExtensionNumberResponse.Merge(m, src)
-}
-func (m *ExtensionNumberResponse) XXX_Size() int {
- return xxx_messageInfo_ExtensionNumberResponse.Size(m)
-}
-func (m *ExtensionNumberResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_ExtensionNumberResponse.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ExtensionNumberResponse proto.InternalMessageInfo
-
-func (m *ExtensionNumberResponse) GetBaseTypeName() string {
- if m != nil {
- return m.BaseTypeName
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+func (x *ExtensionNumberResponse) GetBaseTypeName() string {
+ if x != nil {
+ return x.BaseTypeName
}
return ""
}
-func (m *ExtensionNumberResponse) GetExtensionNumber() []int32 {
- if m != nil {
- return m.ExtensionNumber
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+func (x *ExtensionNumberResponse) GetExtensionNumber() []int32 {
+ if x != nil {
+ return x.ExtensionNumber
}
return nil
}
// A list of ServiceResponse sent by the server answering list_services request.
+//
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
type ListServiceResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
// The information of each service may be expanded in the future, so we use
// ServiceResponse message to encapsulate it.
- Service []*ServiceResponse `protobuf:"bytes,1,rep,name=service,proto3" json:"service,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ //
+ // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+ Service []*ServiceResponse `protobuf:"bytes,1,rep,name=service,proto3" json:"service,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (m *ListServiceResponse) Reset() { *m = ListServiceResponse{} }
-func (m *ListServiceResponse) String() string { return proto.CompactTextString(m) }
-func (*ListServiceResponse) ProtoMessage() {}
+func (x *ListServiceResponse) Reset() {
+ *x = ListServiceResponse{}
+ mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ListServiceResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListServiceResponse) ProtoMessage() {}
+
+func (x *ListServiceResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[5]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListServiceResponse.ProtoReflect.Descriptor instead.
func (*ListServiceResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_42a8ac412db3cb03, []int{5}
+ return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{5}
}
-func (m *ListServiceResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ListServiceResponse.Unmarshal(m, b)
-}
-func (m *ListServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ListServiceResponse.Marshal(b, m, deterministic)
-}
-func (m *ListServiceResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ListServiceResponse.Merge(m, src)
-}
-func (m *ListServiceResponse) XXX_Size() int {
- return xxx_messageInfo_ListServiceResponse.Size(m)
-}
-func (m *ListServiceResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_ListServiceResponse.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ListServiceResponse proto.InternalMessageInfo
-
-func (m *ListServiceResponse) GetService() []*ServiceResponse {
- if m != nil {
- return m.Service
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+func (x *ListServiceResponse) GetService() []*ServiceResponse {
+ if x != nil {
+ return x.Service
}
return nil
}
// The information of a single service used by ListServiceResponse to answer
// list_services request.
+//
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
type ServiceResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
// Full name of a registered service, including its package name. The format
// is <package>.<service>
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ //
+ // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (m *ServiceResponse) Reset() { *m = ServiceResponse{} }
-func (m *ServiceResponse) String() string { return proto.CompactTextString(m) }
-func (*ServiceResponse) ProtoMessage() {}
+func (x *ServiceResponse) Reset() {
+ *x = ServiceResponse{}
+ mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ServiceResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ServiceResponse) ProtoMessage() {}
+
+func (x *ServiceResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[6]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ServiceResponse.ProtoReflect.Descriptor instead.
func (*ServiceResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_42a8ac412db3cb03, []int{6}
+ return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{6}
}
-func (m *ServiceResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ServiceResponse.Unmarshal(m, b)
-}
-func (m *ServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ServiceResponse.Marshal(b, m, deterministic)
-}
-func (m *ServiceResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ServiceResponse.Merge(m, src)
-}
-func (m *ServiceResponse) XXX_Size() int {
- return xxx_messageInfo_ServiceResponse.Size(m)
-}
-func (m *ServiceResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_ServiceResponse.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ServiceResponse proto.InternalMessageInfo
-
-func (m *ServiceResponse) GetName() string {
- if m != nil {
- return m.Name
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+func (x *ServiceResponse) GetName() string {
+ if x != nil {
+ return x.Name
}
return ""
}
// The error code and error message sent by the server when an error occurs.
+//
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
type ErrorResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
// This field uses the error codes defined in grpc::StatusCode.
- ErrorCode int32 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"`
- ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ //
+ // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+ ErrorCode int32 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"`
+ // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+ ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (m *ErrorResponse) Reset() { *m = ErrorResponse{} }
-func (m *ErrorResponse) String() string { return proto.CompactTextString(m) }
-func (*ErrorResponse) ProtoMessage() {}
+func (x *ErrorResponse) Reset() {
+ *x = ErrorResponse{}
+ mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ErrorResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ErrorResponse) ProtoMessage() {}
+
+func (x *ErrorResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[7]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ErrorResponse.ProtoReflect.Descriptor instead.
func (*ErrorResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_42a8ac412db3cb03, []int{7}
+ return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{7}
}
-func (m *ErrorResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ErrorResponse.Unmarshal(m, b)
-}
-func (m *ErrorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ErrorResponse.Marshal(b, m, deterministic)
-}
-func (m *ErrorResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ErrorResponse.Merge(m, src)
-}
-func (m *ErrorResponse) XXX_Size() int {
- return xxx_messageInfo_ErrorResponse.Size(m)
-}
-func (m *ErrorResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_ErrorResponse.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ErrorResponse proto.InternalMessageInfo
-
-func (m *ErrorResponse) GetErrorCode() int32 {
- if m != nil {
- return m.ErrorCode
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+func (x *ErrorResponse) GetErrorCode() int32 {
+ if x != nil {
+ return x.ErrorCode
}
return 0
}
-func (m *ErrorResponse) GetErrorMessage() string {
- if m != nil {
- return m.ErrorMessage
+// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
+func (x *ErrorResponse) GetErrorMessage() string {
+ if x != nil {
+ return x.ErrorMessage
}
return ""
}
-func init() {
- proto.RegisterType((*ServerReflectionRequest)(nil), "grpc.reflection.v1alpha.ServerReflectionRequest")
- proto.RegisterType((*ExtensionRequest)(nil), "grpc.reflection.v1alpha.ExtensionRequest")
- proto.RegisterType((*ServerReflectionResponse)(nil), "grpc.reflection.v1alpha.ServerReflectionResponse")
- proto.RegisterType((*FileDescriptorResponse)(nil), "grpc.reflection.v1alpha.FileDescriptorResponse")
- proto.RegisterType((*ExtensionNumberResponse)(nil), "grpc.reflection.v1alpha.ExtensionNumberResponse")
- proto.RegisterType((*ListServiceResponse)(nil), "grpc.reflection.v1alpha.ListServiceResponse")
- proto.RegisterType((*ServiceResponse)(nil), "grpc.reflection.v1alpha.ServiceResponse")
- proto.RegisterType((*ErrorResponse)(nil), "grpc.reflection.v1alpha.ErrorResponse")
+var File_grpc_reflection_v1alpha_reflection_proto protoreflect.FileDescriptor
+
+const file_grpc_reflection_v1alpha_reflection_proto_rawDesc = "" +
+ "\n" +
+ "(grpc/reflection/v1alpha/reflection.proto\x12\x17grpc.reflection.v1alpha\"\xf8\x02\n" +
+ "\x17ServerReflectionRequest\x12\x12\n" +
+ "\x04host\x18\x01 \x01(\tR\x04host\x12*\n" +
+ "\x10file_by_filename\x18\x03 \x01(\tH\x00R\x0efileByFilename\x126\n" +
+ "\x16file_containing_symbol\x18\x04 \x01(\tH\x00R\x14fileContainingSymbol\x12g\n" +
+ "\x19file_containing_extension\x18\x05 \x01(\v2).grpc.reflection.v1alpha.ExtensionRequestH\x00R\x17fileContainingExtension\x12B\n" +
+ "\x1dall_extension_numbers_of_type\x18\x06 \x01(\tH\x00R\x19allExtensionNumbersOfType\x12%\n" +
+ "\rlist_services\x18\a \x01(\tH\x00R\flistServicesB\x11\n" +
+ "\x0fmessage_request\"f\n" +
+ "\x10ExtensionRequest\x12'\n" +
+ "\x0fcontaining_type\x18\x01 \x01(\tR\x0econtainingType\x12)\n" +
+ "\x10extension_number\x18\x02 \x01(\x05R\x0fextensionNumber\"\xc7\x04\n" +
+ "\x18ServerReflectionResponse\x12\x1d\n" +
+ "\n" +
+ "valid_host\x18\x01 \x01(\tR\tvalidHost\x12[\n" +
+ "\x10original_request\x18\x02 \x01(\v20.grpc.reflection.v1alpha.ServerReflectionRequestR\x0foriginalRequest\x12k\n" +
+ "\x18file_descriptor_response\x18\x04 \x01(\v2/.grpc.reflection.v1alpha.FileDescriptorResponseH\x00R\x16fileDescriptorResponse\x12w\n" +
+ "\x1eall_extension_numbers_response\x18\x05 \x01(\v20.grpc.reflection.v1alpha.ExtensionNumberResponseH\x00R\x1ballExtensionNumbersResponse\x12d\n" +
+ "\x16list_services_response\x18\x06 \x01(\v2,.grpc.reflection.v1alpha.ListServiceResponseH\x00R\x14listServicesResponse\x12O\n" +
+ "\x0eerror_response\x18\a \x01(\v2&.grpc.reflection.v1alpha.ErrorResponseH\x00R\rerrorResponseB\x12\n" +
+ "\x10message_response\"L\n" +
+ "\x16FileDescriptorResponse\x122\n" +
+ "\x15file_descriptor_proto\x18\x01 \x03(\fR\x13fileDescriptorProto\"j\n" +
+ "\x17ExtensionNumberResponse\x12$\n" +
+ "\x0ebase_type_name\x18\x01 \x01(\tR\fbaseTypeName\x12)\n" +
+ "\x10extension_number\x18\x02 \x03(\x05R\x0fextensionNumber\"Y\n" +
+ "\x13ListServiceResponse\x12B\n" +
+ "\aservice\x18\x01 \x03(\v2(.grpc.reflection.v1alpha.ServiceResponseR\aservice\"%\n" +
+ "\x0fServiceResponse\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\"S\n" +
+ "\rErrorResponse\x12\x1d\n" +
+ "\n" +
+ "error_code\x18\x01 \x01(\x05R\terrorCode\x12#\n" +
+ "\rerror_message\x18\x02 \x01(\tR\ferrorMessage2\x93\x01\n" +
+ "\x10ServerReflection\x12\x7f\n" +
+ "\x14ServerReflectionInfo\x120.grpc.reflection.v1alpha.ServerReflectionRequest\x1a1.grpc.reflection.v1alpha.ServerReflectionResponse(\x010\x01Bs\n" +
+ "\x1aio.grpc.reflection.v1alphaB\x15ServerReflectionProtoP\x01Z9google.golang.org/grpc/reflection/grpc_reflection_v1alpha\xb8\x01\x01b\x06proto3"
+
+var (
+ file_grpc_reflection_v1alpha_reflection_proto_rawDescOnce sync.Once
+ file_grpc_reflection_v1alpha_reflection_proto_rawDescData []byte
+)
+
+func file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP() []byte {
+ file_grpc_reflection_v1alpha_reflection_proto_rawDescOnce.Do(func() {
+ file_grpc_reflection_v1alpha_reflection_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_grpc_reflection_v1alpha_reflection_proto_rawDesc), len(file_grpc_reflection_v1alpha_reflection_proto_rawDesc)))
+ })
+ return file_grpc_reflection_v1alpha_reflection_proto_rawDescData
}
-func init() {
- proto.RegisterFile("grpc_reflection_v1alpha/reflection.proto", fileDescriptor_42a8ac412db3cb03)
+var file_grpc_reflection_v1alpha_reflection_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
+var file_grpc_reflection_v1alpha_reflection_proto_goTypes = []any{
+ (*ServerReflectionRequest)(nil), // 0: grpc.reflection.v1alpha.ServerReflectionRequest
+ (*ExtensionRequest)(nil), // 1: grpc.reflection.v1alpha.ExtensionRequest
+ (*ServerReflectionResponse)(nil), // 2: grpc.reflection.v1alpha.ServerReflectionResponse
+ (*FileDescriptorResponse)(nil), // 3: grpc.reflection.v1alpha.FileDescriptorResponse
+ (*ExtensionNumberResponse)(nil), // 4: grpc.reflection.v1alpha.ExtensionNumberResponse
+ (*ListServiceResponse)(nil), // 5: grpc.reflection.v1alpha.ListServiceResponse
+ (*ServiceResponse)(nil), // 6: grpc.reflection.v1alpha.ServiceResponse
+ (*ErrorResponse)(nil), // 7: grpc.reflection.v1alpha.ErrorResponse
+}
+var file_grpc_reflection_v1alpha_reflection_proto_depIdxs = []int32{
+ 1, // 0: grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension:type_name -> grpc.reflection.v1alpha.ExtensionRequest
+ 0, // 1: grpc.reflection.v1alpha.ServerReflectionResponse.original_request:type_name -> grpc.reflection.v1alpha.ServerReflectionRequest
+ 3, // 2: grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response:type_name -> grpc.reflection.v1alpha.FileDescriptorResponse
+ 4, // 3: grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response:type_name -> grpc.reflection.v1alpha.ExtensionNumberResponse
+ 5, // 4: grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response:type_name -> grpc.reflection.v1alpha.ListServiceResponse
+ 7, // 5: grpc.reflection.v1alpha.ServerReflectionResponse.error_response:type_name -> grpc.reflection.v1alpha.ErrorResponse
+ 6, // 6: grpc.reflection.v1alpha.ListServiceResponse.service:type_name -> grpc.reflection.v1alpha.ServiceResponse
+ 0, // 7: grpc.reflection.v1alpha.ServerReflection.ServerReflectionInfo:input_type -> grpc.reflection.v1alpha.ServerReflectionRequest
+ 2, // 8: grpc.reflection.v1alpha.ServerReflection.ServerReflectionInfo:output_type -> grpc.reflection.v1alpha.ServerReflectionResponse
+ 8, // [8:9] is the sub-list for method output_type
+ 7, // [7:8] is the sub-list for method input_type
+ 7, // [7:7] is the sub-list for extension type_name
+ 7, // [7:7] is the sub-list for extension extendee
+ 0, // [0:7] is the sub-list for field type_name
}
-var fileDescriptor_42a8ac412db3cb03 = []byte{
- // 656 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x51, 0x73, 0xd2, 0x40,
- 0x10, 0x6e, 0x5a, 0x68, 0x87, 0x85, 0x02, 0x5e, 0x2b, 0xa4, 0x3a, 0x75, 0x98, 0x68, 0x35, 0x75,
- 0x1c, 0xda, 0xe2, 0x8c, 0x3f, 0x80, 0xaa, 0x83, 0x33, 0xb5, 0x75, 0x0e, 0x5f, 0x1c, 0x1f, 0x6e,
- 0x02, 0x2c, 0x34, 0x1a, 0x72, 0xf1, 0x2e, 0x45, 0x79, 0xf2, 0x47, 0xf8, 0xa3, 0xfc, 0x4b, 0x3e,
- 0x3a, 0x77, 0x09, 0x21, 0xa4, 0x44, 0xa7, 0x4f, 0x30, 0xdf, 0xee, 0xde, 0xb7, 0xbb, 0xdf, 0xb7,
- 0x01, 0x7b, 0x22, 0x82, 0x21, 0x13, 0x38, 0xf6, 0x70, 0x18, 0xba, 0xdc, 0x67, 0xb3, 0x33, 0xc7,
- 0x0b, 0xae, 0x9d, 0x93, 0x25, 0xd4, 0x0e, 0x04, 0x0f, 0x39, 0x69, 0xaa, 0xcc, 0x76, 0x0a, 0x8e,
- 0x33, 0xad, 0x3f, 0x9b, 0xd0, 0xec, 0xa3, 0x98, 0xa1, 0xa0, 0x49, 0x90, 0xe2, 0xb7, 0x1b, 0x94,
- 0x21, 0x21, 0x50, 0xb8, 0xe6, 0x32, 0x34, 0x8d, 0x96, 0x61, 0x97, 0xa8, 0xfe, 0x4f, 0x9e, 0x43,
- 0x7d, 0xec, 0x7a, 0xc8, 0x06, 0x73, 0xa6, 0x7e, 0x7d, 0x67, 0x8a, 0xe6, 0x96, 0x8a, 0xf7, 0x36,
- 0x68, 0x55, 0x21, 0xdd, 0xf9, 0xdb, 0x18, 0x27, 0xaf, 0xa0, 0xa1, 0x73, 0x87, 0xdc, 0x0f, 0x1d,
- 0xd7, 0x77, 0xfd, 0x09, 0x93, 0xf3, 0xe9, 0x80, 0x7b, 0x66, 0x21, 0xae, 0xd8, 0x57, 0xf1, 0xf3,
- 0x24, 0xdc, 0xd7, 0x51, 0x32, 0x81, 0x83, 0x6c, 0x1d, 0xfe, 0x08, 0xd1, 0x97, 0x2e, 0xf7, 0xcd,
- 0x62, 0xcb, 0xb0, 0xcb, 0x9d, 0xe3, 0x76, 0xce, 0x40, 0xed, 0x37, 0x8b, 0xcc, 0x78, 0x8a, 0xde,
- 0x06, 0x6d, 0xae, 0xb2, 0x24, 0x19, 0xa4, 0x0b, 0x87, 0x8e, 0xe7, 0x2d, 0x1f, 0x67, 0xfe, 0xcd,
- 0x74, 0x80, 0x42, 0x32, 0x3e, 0x66, 0xe1, 0x3c, 0x40, 0x73, 0x3b, 0xee, 0xf3, 0xc0, 0xf1, 0xbc,
- 0xa4, 0xec, 0x32, 0x4a, 0xba, 0x1a, 0x7f, 0x9c, 0x07, 0x48, 0x8e, 0x60, 0xd7, 0x73, 0x65, 0xc8,
- 0x24, 0x8a, 0x99, 0x3b, 0x44, 0x69, 0xee, 0xc4, 0x35, 0x15, 0x05, 0xf7, 0x63, 0xb4, 0x7b, 0x0f,
- 0x6a, 0x53, 0x94, 0xd2, 0x99, 0x20, 0x13, 0x51, 0x63, 0xd6, 0x18, 0xea, 0xd9, 0x66, 0xc9, 0x33,
- 0xa8, 0xa5, 0xa6, 0xd6, 0x3d, 0x44, 0xdb, 0xaf, 0x2e, 0x61, 0x4d, 0x7b, 0x0c, 0xf5, 0x6c, 0xdb,
- 0xe6, 0x66, 0xcb, 0xb0, 0x8b, 0xb4, 0x86, 0xab, 0x8d, 0x5a, 0xbf, 0x0b, 0x60, 0xde, 0x96, 0x58,
- 0x06, 0xdc, 0x97, 0x48, 0x0e, 0x01, 0x66, 0x8e, 0xe7, 0x8e, 0x58, 0x4a, 0xe9, 0x92, 0x46, 0x7a,
- 0x4a, 0xee, 0xcf, 0x50, 0xe7, 0xc2, 0x9d, 0xb8, 0xbe, 0xe3, 0x2d, 0xfa, 0xd6, 0x34, 0xe5, 0xce,
- 0x69, 0xae, 0x02, 0x39, 0x76, 0xa2, 0xb5, 0xc5, 0x4b, 0x8b, 0x61, 0xbf, 0x82, 0xa9, 0x75, 0x1e,
- 0xa1, 0x1c, 0x0a, 0x37, 0x08, 0xb9, 0x60, 0x22, 0xee, 0x4b, 0x3b, 0xa4, 0xdc, 0x39, 0xc9, 0x25,
- 0x51, 0x26, 0x7b, 0x9d, 0xd4, 0x2d, 0xc6, 0xe9, 0x6d, 0x50, 0x6d, 0xb9, 0xdb, 0x11, 0xf2, 0x1d,
- 0x1e, 0xad, 0xd7, 0x3a, 0xa1, 0x2c, 0xfe, 0x67, 0xae, 0x8c, 0x01, 0x52, 0x9c, 0x0f, 0xd7, 0xd8,
- 0x23, 0x21, 0x1e, 0x41, 0x63, 0xc5, 0x20, 0x4b, 0xc2, 0x6d, 0x4d, 0xf8, 0x22, 0x97, 0xf0, 0x62,
- 0x69, 0xa0, 0x14, 0xd9, 0x7e, 0xda, 0x57, 0x09, 0xcb, 0x15, 0x54, 0x51, 0x88, 0xf4, 0x06, 0x77,
- 0xf4, 0xeb, 0x4f, 0xf3, 0xc7, 0x51, 0xe9, 0xa9, 0x77, 0x77, 0x31, 0x0d, 0x74, 0x09, 0xd4, 0x97,
- 0x86, 0x8d, 0x30, 0xeb, 0x02, 0x1a, 0xeb, 0xf7, 0x4e, 0x3a, 0x70, 0x3f, 0x2b, 0xa5, 0xfe, 0xf0,
- 0x98, 0x46, 0x6b, 0xcb, 0xae, 0xd0, 0xbd, 0x55, 0x51, 0x3e, 0xa8, 0x90, 0xf5, 0x05, 0x9a, 0x39,
- 0x2b, 0x25, 0x4f, 0xa0, 0x3a, 0x70, 0x24, 0xea, 0x03, 0x60, 0xfa, 0x1b, 0x13, 0x39, 0xb3, 0xa2,
- 0x50, 0xe5, 0xff, 0x4b, 0xf5, 0x7d, 0x59, 0x7f, 0x03, 0x5b, 0xeb, 0x6e, 0xe0, 0x13, 0xec, 0xad,
- 0xd9, 0x26, 0xe9, 0xc2, 0x4e, 0x2c, 0x8b, 0x6e, 0xb4, 0xdc, 0xb1, 0xff, 0xe9, 0xea, 0x54, 0x29,
- 0x5d, 0x14, 0x5a, 0x47, 0x50, 0xcb, 0x3e, 0x4b, 0xa0, 0x90, 0x6a, 0x5a, 0xff, 0xb7, 0xfa, 0xb0,
- 0xbb, 0xb2, 0x71, 0x75, 0x79, 0x91, 0x62, 0x43, 0x3e, 0x8a, 0x52, 0x8b, 0xb4, 0xa4, 0x91, 0x73,
- 0x3e, 0x42, 0xf2, 0x18, 0x22, 0x41, 0x58, 0xac, 0x82, 0x3e, 0xbb, 0x12, 0xad, 0x68, 0xf0, 0x7d,
- 0x84, 0x75, 0x7e, 0x19, 0x50, 0xcf, 0x9e, 0x1b, 0xf9, 0x09, 0xfb, 0x59, 0xec, 0x9d, 0x3f, 0xe6,
- 0xe4, 0xce, 0x17, 0xfb, 0xe0, 0xec, 0x0e, 0x15, 0xd1, 0x54, 0xb6, 0x71, 0x6a, 0x0c, 0xb6, 0xb5,
- 0xf4, 0x2f, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x85, 0x02, 0x09, 0x9d, 0x9f, 0x06, 0x00, 0x00,
-}
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ context.Context
-var _ grpc.ClientConn
-
-// 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.SupportPackageIsVersion4
-
-// ServerReflectionClient is the client API for ServerReflection service.
-//
-// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
-type ServerReflectionClient interface {
- // The reflection service is structured as a bidirectional stream, ensuring
- // all related requests go to a single server.
- ServerReflectionInfo(ctx context.Context, opts ...grpc.CallOption) (ServerReflection_ServerReflectionInfoClient, error)
-}
-
-type serverReflectionClient struct {
- cc *grpc.ClientConn
-}
-
-func NewServerReflectionClient(cc *grpc.ClientConn) ServerReflectionClient {
- return &serverReflectionClient{cc}
-}
-
-func (c *serverReflectionClient) ServerReflectionInfo(ctx context.Context, opts ...grpc.CallOption) (ServerReflection_ServerReflectionInfoClient, error) {
- stream, err := c.cc.NewStream(ctx, &_ServerReflection_serviceDesc.Streams[0], "/grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo", opts...)
- if err != nil {
- return nil, err
+func init() { file_grpc_reflection_v1alpha_reflection_proto_init() }
+func file_grpc_reflection_v1alpha_reflection_proto_init() {
+ if File_grpc_reflection_v1alpha_reflection_proto != nil {
+ return
}
- x := &serverReflectionServerReflectionInfoClient{stream}
- return x, nil
-}
-
-type ServerReflection_ServerReflectionInfoClient interface {
- Send(*ServerReflectionRequest) error
- Recv() (*ServerReflectionResponse, error)
- grpc.ClientStream
-}
-
-type serverReflectionServerReflectionInfoClient struct {
- grpc.ClientStream
-}
-
-func (x *serverReflectionServerReflectionInfoClient) Send(m *ServerReflectionRequest) error {
- return x.ClientStream.SendMsg(m)
-}
-
-func (x *serverReflectionServerReflectionInfoClient) Recv() (*ServerReflectionResponse, error) {
- m := new(ServerReflectionResponse)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
+ file_grpc_reflection_v1alpha_reflection_proto_msgTypes[0].OneofWrappers = []any{
+ (*ServerReflectionRequest_FileByFilename)(nil),
+ (*ServerReflectionRequest_FileContainingSymbol)(nil),
+ (*ServerReflectionRequest_FileContainingExtension)(nil),
+ (*ServerReflectionRequest_AllExtensionNumbersOfType)(nil),
+ (*ServerReflectionRequest_ListServices)(nil),
}
- return m, nil
-}
-
-// ServerReflectionServer is the server API for ServerReflection service.
-type ServerReflectionServer interface {
- // The reflection service is structured as a bidirectional stream, ensuring
- // all related requests go to a single server.
- ServerReflectionInfo(ServerReflection_ServerReflectionInfoServer) error
-}
-
-// UnimplementedServerReflectionServer can be embedded to have forward compatible implementations.
-type UnimplementedServerReflectionServer struct {
-}
-
-func (*UnimplementedServerReflectionServer) ServerReflectionInfo(srv ServerReflection_ServerReflectionInfoServer) error {
- return status.Errorf(codes.Unimplemented, "method ServerReflectionInfo not implemented")
-}
-
-func RegisterServerReflectionServer(s *grpc.Server, srv ServerReflectionServer) {
- s.RegisterService(&_ServerReflection_serviceDesc, srv)
-}
-
-func _ServerReflection_ServerReflectionInfo_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(ServerReflectionServer).ServerReflectionInfo(&serverReflectionServerReflectionInfoServer{stream})
-}
-
-type ServerReflection_ServerReflectionInfoServer interface {
- Send(*ServerReflectionResponse) error
- Recv() (*ServerReflectionRequest, error)
- grpc.ServerStream
-}
-
-type serverReflectionServerReflectionInfoServer struct {
- grpc.ServerStream
-}
-
-func (x *serverReflectionServerReflectionInfoServer) Send(m *ServerReflectionResponse) error {
- return x.ServerStream.SendMsg(m)
-}
-
-func (x *serverReflectionServerReflectionInfoServer) Recv() (*ServerReflectionRequest, error) {
- m := new(ServerReflectionRequest)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
+ file_grpc_reflection_v1alpha_reflection_proto_msgTypes[2].OneofWrappers = []any{
+ (*ServerReflectionResponse_FileDescriptorResponse)(nil),
+ (*ServerReflectionResponse_AllExtensionNumbersResponse)(nil),
+ (*ServerReflectionResponse_ListServicesResponse)(nil),
+ (*ServerReflectionResponse_ErrorResponse)(nil),
}
- return m, nil
-}
-
-var _ServerReflection_serviceDesc = grpc.ServiceDesc{
- ServiceName: "grpc.reflection.v1alpha.ServerReflection",
- HandlerType: (*ServerReflectionServer)(nil),
- Methods: []grpc.MethodDesc{},
- Streams: []grpc.StreamDesc{
- {
- StreamName: "ServerReflectionInfo",
- Handler: _ServerReflection_ServerReflectionInfo_Handler,
- ServerStreams: true,
- ClientStreams: true,
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_grpc_reflection_v1alpha_reflection_proto_rawDesc), len(file_grpc_reflection_v1alpha_reflection_proto_rawDesc)),
+ NumEnums: 0,
+ NumMessages: 8,
+ NumExtensions: 0,
+ NumServices: 1,
},
- },
- Metadata: "grpc_reflection_v1alpha/reflection.proto",
+ GoTypes: file_grpc_reflection_v1alpha_reflection_proto_goTypes,
+ DependencyIndexes: file_grpc_reflection_v1alpha_reflection_proto_depIdxs,
+ MessageInfos: file_grpc_reflection_v1alpha_reflection_proto_msgTypes,
+ }.Build()
+ File_grpc_reflection_v1alpha_reflection_proto = out.File
+ file_grpc_reflection_v1alpha_reflection_proto_goTypes = nil
+ file_grpc_reflection_v1alpha_reflection_proto_depIdxs = nil
}
diff --git a/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.proto b/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.proto
deleted file mode 100644
index 99b00df..0000000
--- a/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.proto
+++ /dev/null
@@ -1,136 +0,0 @@
-// Copyright 2016 gRPC authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Service exported by server reflection
-
-syntax = "proto3";
-
-package grpc.reflection.v1alpha;
-
-service ServerReflection {
- // The reflection service is structured as a bidirectional stream, ensuring
- // all related requests go to a single server.
- rpc ServerReflectionInfo(stream ServerReflectionRequest)
- returns (stream ServerReflectionResponse);
-}
-
-// The message sent by the client when calling ServerReflectionInfo method.
-message ServerReflectionRequest {
- string host = 1;
- // To use reflection service, the client should set one of the following
- // fields in message_request. The server distinguishes requests by their
- // defined field and then handles them using corresponding methods.
- oneof message_request {
- // Find a proto file by the file name.
- string file_by_filename = 3;
-
- // Find the proto file that declares the given fully-qualified symbol name.
- // This field should be a fully-qualified symbol name
- // (e.g. <package>.<service>[.<method>] or <package>.<type>).
- string file_containing_symbol = 4;
-
- // Find the proto file which defines an extension extending the given
- // message type with the given field number.
- ExtensionRequest file_containing_extension = 5;
-
- // Finds the tag numbers used by all known extensions of extendee_type, and
- // appends them to ExtensionNumberResponse in an undefined order.
- // Its corresponding method is best-effort: it's not guaranteed that the
- // reflection service will implement this method, and it's not guaranteed
- // that this method will provide all extensions. Returns
- // StatusCode::UNIMPLEMENTED if it's not implemented.
- // This field should be a fully-qualified type name. The format is
- // <package>.<type>
- string all_extension_numbers_of_type = 6;
-
- // List the full names of registered services. The content will not be
- // checked.
- string list_services = 7;
- }
-}
-
-// The type name and extension number sent by the client when requesting
-// file_containing_extension.
-message ExtensionRequest {
- // Fully-qualified type name. The format should be <package>.<type>
- string containing_type = 1;
- int32 extension_number = 2;
-}
-
-// The message sent by the server to answer ServerReflectionInfo method.
-message ServerReflectionResponse {
- string valid_host = 1;
- ServerReflectionRequest original_request = 2;
- // The server sets one of the following fields according to the
- // message_request in the request.
- oneof message_response {
- // This message is used to answer file_by_filename, file_containing_symbol,
- // file_containing_extension requests with transitive dependencies.
- // As the repeated label is not allowed in oneof fields, we use a
- // FileDescriptorResponse message to encapsulate the repeated fields.
- // The reflection service is allowed to avoid sending FileDescriptorProtos
- // that were previously sent in response to earlier requests in the stream.
- FileDescriptorResponse file_descriptor_response = 4;
-
- // This message is used to answer all_extension_numbers_of_type requests.
- ExtensionNumberResponse all_extension_numbers_response = 5;
-
- // This message is used to answer list_services requests.
- ListServiceResponse list_services_response = 6;
-
- // This message is used when an error occurs.
- ErrorResponse error_response = 7;
- }
-}
-
-// Serialized FileDescriptorProto messages sent by the server answering
-// a file_by_filename, file_containing_symbol, or file_containing_extension
-// request.
-message FileDescriptorResponse {
- // Serialized FileDescriptorProto messages. We avoid taking a dependency on
- // descriptor.proto, which uses proto2 only features, by making them opaque
- // bytes instead.
- repeated bytes file_descriptor_proto = 1;
-}
-
-// A list of extension numbers sent by the server answering
-// all_extension_numbers_of_type request.
-message ExtensionNumberResponse {
- // Full name of the base type, including the package name. The format
- // is <package>.<type>
- string base_type_name = 1;
- repeated int32 extension_number = 2;
-}
-
-// A list of ServiceResponse sent by the server answering list_services request.
-message ListServiceResponse {
- // The information of each service may be expanded in the future, so we use
- // ServiceResponse message to encapsulate it.
- repeated ServiceResponse service = 1;
-}
-
-// The information of a single service used by ListServiceResponse to answer
-// list_services request.
-message ServiceResponse {
- // Full name of a registered service, including its package name. The format
- // is <package>.<service>
- string name = 1;
-}
-
-// The error code and error message sent by the server when an error occurs.
-message ErrorResponse {
- // This field uses the error codes defined in grpc::StatusCode.
- int32 error_code = 1;
- string error_message = 2;
-}
diff --git a/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection_grpc.pb.go b/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection_grpc.pb.go
new file mode 100644
index 0000000..0a43b52
--- /dev/null
+++ b/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection_grpc.pb.go
@@ -0,0 +1,135 @@
+// Copyright 2016 The gRPC Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// Service exported by server reflection
+
+// Warning: this entire file is deprecated. Use this instead:
+// https://github.com/grpc/grpc-proto/blob/master/grpc/reflection/v1/reflection.proto
+
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.5.1
+// - protoc v5.27.1
+// grpc/reflection/v1alpha/reflection.proto is a deprecated file.
+
+package grpc_reflection_v1alpha
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ ServerReflection_ServerReflectionInfo_FullMethodName = "/grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo"
+)
+
+// ServerReflectionClient is the client API for ServerReflection service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type ServerReflectionClient interface {
+ // The reflection service is structured as a bidirectional stream, ensuring
+ // all related requests go to a single server.
+ ServerReflectionInfo(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ServerReflectionRequest, ServerReflectionResponse], error)
+}
+
+type serverReflectionClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewServerReflectionClient(cc grpc.ClientConnInterface) ServerReflectionClient {
+ return &serverReflectionClient{cc}
+}
+
+func (c *serverReflectionClient) ServerReflectionInfo(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ServerReflectionRequest, ServerReflectionResponse], error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &ServerReflection_ServiceDesc.Streams[0], ServerReflection_ServerReflectionInfo_FullMethodName, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &grpc.GenericClientStream[ServerReflectionRequest, ServerReflectionResponse]{ClientStream: stream}
+ return x, nil
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type ServerReflection_ServerReflectionInfoClient = grpc.BidiStreamingClient[ServerReflectionRequest, ServerReflectionResponse]
+
+// ServerReflectionServer is the server API for ServerReflection service.
+// All implementations should embed UnimplementedServerReflectionServer
+// for forward compatibility.
+type ServerReflectionServer interface {
+ // The reflection service is structured as a bidirectional stream, ensuring
+ // all related requests go to a single server.
+ ServerReflectionInfo(grpc.BidiStreamingServer[ServerReflectionRequest, ServerReflectionResponse]) error
+}
+
+// UnimplementedServerReflectionServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedServerReflectionServer struct{}
+
+func (UnimplementedServerReflectionServer) ServerReflectionInfo(grpc.BidiStreamingServer[ServerReflectionRequest, ServerReflectionResponse]) error {
+ return status.Error(codes.Unimplemented, "method ServerReflectionInfo not implemented")
+}
+func (UnimplementedServerReflectionServer) testEmbeddedByValue() {}
+
+// UnsafeServerReflectionServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to ServerReflectionServer will
+// result in compilation errors.
+type UnsafeServerReflectionServer interface {
+ mustEmbedUnimplementedServerReflectionServer()
+}
+
+func RegisterServerReflectionServer(s grpc.ServiceRegistrar, srv ServerReflectionServer) {
+ // If the following call panics, it indicates UnimplementedServerReflectionServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
+ s.RegisterService(&ServerReflection_ServiceDesc, srv)
+}
+
+func _ServerReflection_ServerReflectionInfo_Handler(srv interface{}, stream grpc.ServerStream) error {
+ return srv.(ServerReflectionServer).ServerReflectionInfo(&grpc.GenericServerStream[ServerReflectionRequest, ServerReflectionResponse]{ServerStream: stream})
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type ServerReflection_ServerReflectionInfoServer = grpc.BidiStreamingServer[ServerReflectionRequest, ServerReflectionResponse]
+
+// ServerReflection_ServiceDesc is the grpc.ServiceDesc for ServerReflection service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var ServerReflection_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "grpc.reflection.v1alpha.ServerReflection",
+ HandlerType: (*ServerReflectionServer)(nil),
+ Methods: []grpc.MethodDesc{},
+ Streams: []grpc.StreamDesc{
+ {
+ StreamName: "ServerReflectionInfo",
+ Handler: _ServerReflection_ServerReflectionInfo_Handler,
+ ServerStreams: true,
+ ClientStreams: true,
+ },
+ },
+ Metadata: "grpc/reflection/v1alpha/reflection.proto",
+}
diff --git a/vendor/google.golang.org/grpc/reflection/internal/internal.go b/vendor/google.golang.org/grpc/reflection/internal/internal.go
new file mode 100644
index 0000000..902fc6d
--- /dev/null
+++ b/vendor/google.golang.org/grpc/reflection/internal/internal.go
@@ -0,0 +1,436 @@
+/*
+ *
+ * Copyright 2024 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// Package internal contains code that is shared by both reflection package and
+// the test package. The packages are split in this way inorder to avoid
+// dependency to deprecated package github.com/golang/protobuf.
+package internal
+
+import (
+ "io"
+ "sort"
+
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/status"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/reflect/protodesc"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoregistry"
+
+ v1reflectiongrpc "google.golang.org/grpc/reflection/grpc_reflection_v1"
+ v1reflectionpb "google.golang.org/grpc/reflection/grpc_reflection_v1"
+ v1alphareflectiongrpc "google.golang.org/grpc/reflection/grpc_reflection_v1alpha"
+ v1alphareflectionpb "google.golang.org/grpc/reflection/grpc_reflection_v1alpha"
+)
+
+// ServiceInfoProvider is an interface used to retrieve metadata about the
+// services to expose.
+type ServiceInfoProvider interface {
+ GetServiceInfo() map[string]grpc.ServiceInfo
+}
+
+// ExtensionResolver is the interface used to query details about extensions.
+// This interface is satisfied by protoregistry.GlobalTypes.
+type ExtensionResolver interface {
+ protoregistry.ExtensionTypeResolver
+ RangeExtensionsByMessage(message protoreflect.FullName, f func(protoreflect.ExtensionType) bool)
+}
+
+// ServerReflectionServer is the server API for ServerReflection service.
+type ServerReflectionServer struct {
+ v1alphareflectiongrpc.UnimplementedServerReflectionServer
+ S ServiceInfoProvider
+ DescResolver protodesc.Resolver
+ ExtResolver ExtensionResolver
+}
+
+// FileDescWithDependencies returns a slice of serialized fileDescriptors in
+// wire format ([]byte). The fileDescriptors will include fd and all the
+// transitive dependencies of fd with names not in sentFileDescriptors.
+func (s *ServerReflectionServer) FileDescWithDependencies(fd protoreflect.FileDescriptor, sentFileDescriptors map[string]bool) ([][]byte, error) {
+ if fd.IsPlaceholder() {
+ // If the given root file is a placeholder, treat it
+ // as missing instead of serializing it.
+ return nil, protoregistry.NotFound
+ }
+ var r [][]byte
+ queue := []protoreflect.FileDescriptor{fd}
+ for len(queue) > 0 {
+ currentfd := queue[0]
+ queue = queue[1:]
+ if currentfd.IsPlaceholder() {
+ // Skip any missing files in the dependency graph.
+ continue
+ }
+ if sent := sentFileDescriptors[currentfd.Path()]; len(r) == 0 || !sent {
+ sentFileDescriptors[currentfd.Path()] = true
+ fdProto := protodesc.ToFileDescriptorProto(currentfd)
+ currentfdEncoded, err := proto.Marshal(fdProto)
+ if err != nil {
+ return nil, err
+ }
+ r = append(r, currentfdEncoded)
+ }
+ for i := 0; i < currentfd.Imports().Len(); i++ {
+ queue = append(queue, currentfd.Imports().Get(i))
+ }
+ }
+ return r, nil
+}
+
+// FileDescEncodingContainingSymbol finds the file descriptor containing the
+// given symbol, finds all of its previously unsent transitive dependencies,
+// does marshalling on them, and returns the marshalled result. The given symbol
+// can be a type, a service or a method.
+func (s *ServerReflectionServer) FileDescEncodingContainingSymbol(name string, sentFileDescriptors map[string]bool) ([][]byte, error) {
+ d, err := s.DescResolver.FindDescriptorByName(protoreflect.FullName(name))
+ if err != nil {
+ return nil, err
+ }
+ return s.FileDescWithDependencies(d.ParentFile(), sentFileDescriptors)
+}
+
+// FileDescEncodingContainingExtension finds the file descriptor containing
+// given extension, finds all of its previously unsent transitive dependencies,
+// does marshalling on them, and returns the marshalled result.
+func (s *ServerReflectionServer) FileDescEncodingContainingExtension(typeName string, extNum int32, sentFileDescriptors map[string]bool) ([][]byte, error) {
+ xt, err := s.ExtResolver.FindExtensionByNumber(protoreflect.FullName(typeName), protoreflect.FieldNumber(extNum))
+ if err != nil {
+ return nil, err
+ }
+ return s.FileDescWithDependencies(xt.TypeDescriptor().ParentFile(), sentFileDescriptors)
+}
+
+// AllExtensionNumbersForTypeName returns all extension numbers for the given type.
+func (s *ServerReflectionServer) AllExtensionNumbersForTypeName(name string) ([]int32, error) {
+ var numbers []int32
+ s.ExtResolver.RangeExtensionsByMessage(protoreflect.FullName(name), func(xt protoreflect.ExtensionType) bool {
+ numbers = append(numbers, int32(xt.TypeDescriptor().Number()))
+ return true
+ })
+ sort.Slice(numbers, func(i, j int) bool {
+ return numbers[i] < numbers[j]
+ })
+ if len(numbers) == 0 {
+ // maybe return an error if given type name is not known
+ if _, err := s.DescResolver.FindDescriptorByName(protoreflect.FullName(name)); err != nil {
+ return nil, err
+ }
+ }
+ return numbers, nil
+}
+
+// ListServices returns the names of services this server exposes.
+func (s *ServerReflectionServer) ListServices() []*v1reflectionpb.ServiceResponse {
+ serviceInfo := s.S.GetServiceInfo()
+ resp := make([]*v1reflectionpb.ServiceResponse, 0, len(serviceInfo))
+ for svc := range serviceInfo {
+ resp = append(resp, &v1reflectionpb.ServiceResponse{Name: svc})
+ }
+ sort.Slice(resp, func(i, j int) bool {
+ return resp[i].Name < resp[j].Name
+ })
+ return resp
+}
+
+// ServerReflectionInfo is the reflection service handler.
+func (s *ServerReflectionServer) ServerReflectionInfo(stream v1reflectiongrpc.ServerReflection_ServerReflectionInfoServer) error {
+ sentFileDescriptors := make(map[string]bool)
+ for {
+ in, err := stream.Recv()
+ if err == io.EOF {
+ return nil
+ }
+ if err != nil {
+ return err
+ }
+
+ out := &v1reflectionpb.ServerReflectionResponse{
+ ValidHost: in.Host,
+ OriginalRequest: in,
+ }
+ switch req := in.MessageRequest.(type) {
+ case *v1reflectionpb.ServerReflectionRequest_FileByFilename:
+ var b [][]byte
+ fd, err := s.DescResolver.FindFileByPath(req.FileByFilename)
+ if err == nil {
+ b, err = s.FileDescWithDependencies(fd, sentFileDescriptors)
+ }
+ if err != nil {
+ out.MessageResponse = &v1reflectionpb.ServerReflectionResponse_ErrorResponse{
+ ErrorResponse: &v1reflectionpb.ErrorResponse{
+ ErrorCode: int32(codes.NotFound),
+ ErrorMessage: err.Error(),
+ },
+ }
+ } else {
+ out.MessageResponse = &v1reflectionpb.ServerReflectionResponse_FileDescriptorResponse{
+ FileDescriptorResponse: &v1reflectionpb.FileDescriptorResponse{FileDescriptorProto: b},
+ }
+ }
+ case *v1reflectionpb.ServerReflectionRequest_FileContainingSymbol:
+ b, err := s.FileDescEncodingContainingSymbol(req.FileContainingSymbol, sentFileDescriptors)
+ if err != nil {
+ out.MessageResponse = &v1reflectionpb.ServerReflectionResponse_ErrorResponse{
+ ErrorResponse: &v1reflectionpb.ErrorResponse{
+ ErrorCode: int32(codes.NotFound),
+ ErrorMessage: err.Error(),
+ },
+ }
+ } else {
+ out.MessageResponse = &v1reflectionpb.ServerReflectionResponse_FileDescriptorResponse{
+ FileDescriptorResponse: &v1reflectionpb.FileDescriptorResponse{FileDescriptorProto: b},
+ }
+ }
+ case *v1reflectionpb.ServerReflectionRequest_FileContainingExtension:
+ typeName := req.FileContainingExtension.ContainingType
+ extNum := req.FileContainingExtension.ExtensionNumber
+ b, err := s.FileDescEncodingContainingExtension(typeName, extNum, sentFileDescriptors)
+ if err != nil {
+ out.MessageResponse = &v1reflectionpb.ServerReflectionResponse_ErrorResponse{
+ ErrorResponse: &v1reflectionpb.ErrorResponse{
+ ErrorCode: int32(codes.NotFound),
+ ErrorMessage: err.Error(),
+ },
+ }
+ } else {
+ out.MessageResponse = &v1reflectionpb.ServerReflectionResponse_FileDescriptorResponse{
+ FileDescriptorResponse: &v1reflectionpb.FileDescriptorResponse{FileDescriptorProto: b},
+ }
+ }
+ case *v1reflectionpb.ServerReflectionRequest_AllExtensionNumbersOfType:
+ extNums, err := s.AllExtensionNumbersForTypeName(req.AllExtensionNumbersOfType)
+ if err != nil {
+ out.MessageResponse = &v1reflectionpb.ServerReflectionResponse_ErrorResponse{
+ ErrorResponse: &v1reflectionpb.ErrorResponse{
+ ErrorCode: int32(codes.NotFound),
+ ErrorMessage: err.Error(),
+ },
+ }
+ } else {
+ out.MessageResponse = &v1reflectionpb.ServerReflectionResponse_AllExtensionNumbersResponse{
+ AllExtensionNumbersResponse: &v1reflectionpb.ExtensionNumberResponse{
+ BaseTypeName: req.AllExtensionNumbersOfType,
+ ExtensionNumber: extNums,
+ },
+ }
+ }
+ case *v1reflectionpb.ServerReflectionRequest_ListServices:
+ out.MessageResponse = &v1reflectionpb.ServerReflectionResponse_ListServicesResponse{
+ ListServicesResponse: &v1reflectionpb.ListServiceResponse{
+ Service: s.ListServices(),
+ },
+ }
+ default:
+ return status.Errorf(codes.InvalidArgument, "invalid MessageRequest: %v", in.MessageRequest)
+ }
+
+ if err := stream.Send(out); err != nil {
+ return err
+ }
+ }
+}
+
+// V1ToV1AlphaResponse converts a v1 ServerReflectionResponse to a v1alpha.
+func V1ToV1AlphaResponse(v1 *v1reflectionpb.ServerReflectionResponse) *v1alphareflectionpb.ServerReflectionResponse {
+ var v1alpha v1alphareflectionpb.ServerReflectionResponse
+ v1alpha.ValidHost = v1.ValidHost
+ if v1.OriginalRequest != nil {
+ v1alpha.OriginalRequest = V1ToV1AlphaRequest(v1.OriginalRequest)
+ }
+ switch mr := v1.MessageResponse.(type) {
+ case *v1reflectionpb.ServerReflectionResponse_FileDescriptorResponse:
+ if mr != nil {
+ v1alpha.MessageResponse = &v1alphareflectionpb.ServerReflectionResponse_FileDescriptorResponse{
+ FileDescriptorResponse: &v1alphareflectionpb.FileDescriptorResponse{
+ FileDescriptorProto: mr.FileDescriptorResponse.GetFileDescriptorProto(),
+ },
+ }
+ }
+ case *v1reflectionpb.ServerReflectionResponse_AllExtensionNumbersResponse:
+ if mr != nil {
+ v1alpha.MessageResponse = &v1alphareflectionpb.ServerReflectionResponse_AllExtensionNumbersResponse{
+ AllExtensionNumbersResponse: &v1alphareflectionpb.ExtensionNumberResponse{
+ BaseTypeName: mr.AllExtensionNumbersResponse.GetBaseTypeName(),
+ ExtensionNumber: mr.AllExtensionNumbersResponse.GetExtensionNumber(),
+ },
+ }
+ }
+ case *v1reflectionpb.ServerReflectionResponse_ListServicesResponse:
+ if mr != nil {
+ svcs := make([]*v1alphareflectionpb.ServiceResponse, len(mr.ListServicesResponse.GetService()))
+ for i, svc := range mr.ListServicesResponse.GetService() {
+ svcs[i] = &v1alphareflectionpb.ServiceResponse{
+ Name: svc.GetName(),
+ }
+ }
+ v1alpha.MessageResponse = &v1alphareflectionpb.ServerReflectionResponse_ListServicesResponse{
+ ListServicesResponse: &v1alphareflectionpb.ListServiceResponse{
+ Service: svcs,
+ },
+ }
+ }
+ case *v1reflectionpb.ServerReflectionResponse_ErrorResponse:
+ if mr != nil {
+ v1alpha.MessageResponse = &v1alphareflectionpb.ServerReflectionResponse_ErrorResponse{
+ ErrorResponse: &v1alphareflectionpb.ErrorResponse{
+ ErrorCode: mr.ErrorResponse.GetErrorCode(),
+ ErrorMessage: mr.ErrorResponse.GetErrorMessage(),
+ },
+ }
+ }
+ default:
+ // no value set
+ }
+ return &v1alpha
+}
+
+// V1AlphaToV1Request converts a v1alpha ServerReflectionRequest to a v1.
+func V1AlphaToV1Request(v1alpha *v1alphareflectionpb.ServerReflectionRequest) *v1reflectionpb.ServerReflectionRequest {
+ var v1 v1reflectionpb.ServerReflectionRequest
+ v1.Host = v1alpha.Host
+ switch mr := v1alpha.MessageRequest.(type) {
+ case *v1alphareflectionpb.ServerReflectionRequest_FileByFilename:
+ v1.MessageRequest = &v1reflectionpb.ServerReflectionRequest_FileByFilename{
+ FileByFilename: mr.FileByFilename,
+ }
+ case *v1alphareflectionpb.ServerReflectionRequest_FileContainingSymbol:
+ v1.MessageRequest = &v1reflectionpb.ServerReflectionRequest_FileContainingSymbol{
+ FileContainingSymbol: mr.FileContainingSymbol,
+ }
+ case *v1alphareflectionpb.ServerReflectionRequest_FileContainingExtension:
+ if mr.FileContainingExtension != nil {
+ v1.MessageRequest = &v1reflectionpb.ServerReflectionRequest_FileContainingExtension{
+ FileContainingExtension: &v1reflectionpb.ExtensionRequest{
+ ContainingType: mr.FileContainingExtension.GetContainingType(),
+ ExtensionNumber: mr.FileContainingExtension.GetExtensionNumber(),
+ },
+ }
+ }
+ case *v1alphareflectionpb.ServerReflectionRequest_AllExtensionNumbersOfType:
+ v1.MessageRequest = &v1reflectionpb.ServerReflectionRequest_AllExtensionNumbersOfType{
+ AllExtensionNumbersOfType: mr.AllExtensionNumbersOfType,
+ }
+ case *v1alphareflectionpb.ServerReflectionRequest_ListServices:
+ v1.MessageRequest = &v1reflectionpb.ServerReflectionRequest_ListServices{
+ ListServices: mr.ListServices,
+ }
+ default:
+ // no value set
+ }
+ return &v1
+}
+
+// V1ToV1AlphaRequest converts a v1 ServerReflectionRequest to a v1alpha.
+func V1ToV1AlphaRequest(v1 *v1reflectionpb.ServerReflectionRequest) *v1alphareflectionpb.ServerReflectionRequest {
+ var v1alpha v1alphareflectionpb.ServerReflectionRequest
+ v1alpha.Host = v1.Host
+ switch mr := v1.MessageRequest.(type) {
+ case *v1reflectionpb.ServerReflectionRequest_FileByFilename:
+ if mr != nil {
+ v1alpha.MessageRequest = &v1alphareflectionpb.ServerReflectionRequest_FileByFilename{
+ FileByFilename: mr.FileByFilename,
+ }
+ }
+ case *v1reflectionpb.ServerReflectionRequest_FileContainingSymbol:
+ if mr != nil {
+ v1alpha.MessageRequest = &v1alphareflectionpb.ServerReflectionRequest_FileContainingSymbol{
+ FileContainingSymbol: mr.FileContainingSymbol,
+ }
+ }
+ case *v1reflectionpb.ServerReflectionRequest_FileContainingExtension:
+ if mr != nil {
+ v1alpha.MessageRequest = &v1alphareflectionpb.ServerReflectionRequest_FileContainingExtension{
+ FileContainingExtension: &v1alphareflectionpb.ExtensionRequest{
+ ContainingType: mr.FileContainingExtension.GetContainingType(),
+ ExtensionNumber: mr.FileContainingExtension.GetExtensionNumber(),
+ },
+ }
+ }
+ case *v1reflectionpb.ServerReflectionRequest_AllExtensionNumbersOfType:
+ if mr != nil {
+ v1alpha.MessageRequest = &v1alphareflectionpb.ServerReflectionRequest_AllExtensionNumbersOfType{
+ AllExtensionNumbersOfType: mr.AllExtensionNumbersOfType,
+ }
+ }
+ case *v1reflectionpb.ServerReflectionRequest_ListServices:
+ if mr != nil {
+ v1alpha.MessageRequest = &v1alphareflectionpb.ServerReflectionRequest_ListServices{
+ ListServices: mr.ListServices,
+ }
+ }
+ default:
+ // no value set
+ }
+ return &v1alpha
+}
+
+// V1AlphaToV1Response converts a v1alpha ServerReflectionResponse to a v1.
+func V1AlphaToV1Response(v1alpha *v1alphareflectionpb.ServerReflectionResponse) *v1reflectionpb.ServerReflectionResponse {
+ var v1 v1reflectionpb.ServerReflectionResponse
+ v1.ValidHost = v1alpha.ValidHost
+ if v1alpha.OriginalRequest != nil {
+ v1.OriginalRequest = V1AlphaToV1Request(v1alpha.OriginalRequest)
+ }
+ switch mr := v1alpha.MessageResponse.(type) {
+ case *v1alphareflectionpb.ServerReflectionResponse_FileDescriptorResponse:
+ if mr != nil {
+ v1.MessageResponse = &v1reflectionpb.ServerReflectionResponse_FileDescriptorResponse{
+ FileDescriptorResponse: &v1reflectionpb.FileDescriptorResponse{
+ FileDescriptorProto: mr.FileDescriptorResponse.GetFileDescriptorProto(),
+ },
+ }
+ }
+ case *v1alphareflectionpb.ServerReflectionResponse_AllExtensionNumbersResponse:
+ if mr != nil {
+ v1.MessageResponse = &v1reflectionpb.ServerReflectionResponse_AllExtensionNumbersResponse{
+ AllExtensionNumbersResponse: &v1reflectionpb.ExtensionNumberResponse{
+ BaseTypeName: mr.AllExtensionNumbersResponse.GetBaseTypeName(),
+ ExtensionNumber: mr.AllExtensionNumbersResponse.GetExtensionNumber(),
+ },
+ }
+ }
+ case *v1alphareflectionpb.ServerReflectionResponse_ListServicesResponse:
+ if mr != nil {
+ svcs := make([]*v1reflectionpb.ServiceResponse, len(mr.ListServicesResponse.GetService()))
+ for i, svc := range mr.ListServicesResponse.GetService() {
+ svcs[i] = &v1reflectionpb.ServiceResponse{
+ Name: svc.GetName(),
+ }
+ }
+ v1.MessageResponse = &v1reflectionpb.ServerReflectionResponse_ListServicesResponse{
+ ListServicesResponse: &v1reflectionpb.ListServiceResponse{
+ Service: svcs,
+ },
+ }
+ }
+ case *v1alphareflectionpb.ServerReflectionResponse_ErrorResponse:
+ if mr != nil {
+ v1.MessageResponse = &v1reflectionpb.ServerReflectionResponse_ErrorResponse{
+ ErrorResponse: &v1reflectionpb.ErrorResponse{
+ ErrorCode: mr.ErrorResponse.GetErrorCode(),
+ ErrorMessage: mr.ErrorResponse.GetErrorMessage(),
+ },
+ }
+ }
+ default:
+ // no value set
+ }
+ return &v1
+}
diff --git a/vendor/google.golang.org/grpc/reflection/serverreflection.go b/vendor/google.golang.org/grpc/reflection/serverreflection.go
index dd22a2d..13a94e2 100644
--- a/vendor/google.golang.org/grpc/reflection/serverreflection.go
+++ b/vendor/google.golang.org/grpc/reflection/serverreflection.go
@@ -16,8 +16,6 @@
*
*/
-//go:generate protoc --go_out=plugins=grpc:. grpc_reflection_v1alpha/reflection.proto
-
/*
Package reflection implements server reflection service.
@@ -25,6 +23,7 @@
https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1alpha/reflection.proto.
To register server reflection on a gRPC server:
+
import "google.golang.org/grpc/reflection"
s := grpc.NewServer()
@@ -34,421 +33,128 @@
reflection.Register(s)
s.Serve(lis)
-
*/
package reflection // import "google.golang.org/grpc/reflection"
import (
- "bytes"
- "compress/gzip"
- "fmt"
- "io"
- "io/ioutil"
- "reflect"
- "sort"
- "sync"
-
- "github.com/golang/protobuf/proto"
- dpb "github.com/golang/protobuf/protoc-gen-go/descriptor"
"google.golang.org/grpc"
- "google.golang.org/grpc/codes"
- rpb "google.golang.org/grpc/reflection/grpc_reflection_v1alpha"
- "google.golang.org/grpc/status"
+ "google.golang.org/grpc/reflection/internal"
+ "google.golang.org/protobuf/reflect/protodesc"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoregistry"
+
+ v1reflectiongrpc "google.golang.org/grpc/reflection/grpc_reflection_v1"
+ v1alphareflectiongrpc "google.golang.org/grpc/reflection/grpc_reflection_v1alpha"
)
-type serverReflectionServer struct {
- s *grpc.Server
-
- initSymbols sync.Once
- serviceNames []string
- symbols map[string]*dpb.FileDescriptorProto // map of fully-qualified names to files
+// GRPCServer is the interface provided by a gRPC server. It is implemented by
+// *grpc.Server, but could also be implemented by other concrete types. It acts
+// as a registry, for accumulating the services exposed by the server.
+type GRPCServer interface {
+ grpc.ServiceRegistrar
+ ServiceInfoProvider
}
+var _ GRPCServer = (*grpc.Server)(nil)
+
// Register registers the server reflection service on the given gRPC server.
-func Register(s *grpc.Server) {
- rpb.RegisterServerReflectionServer(s, &serverReflectionServer{
- s: s,
- })
+// Both the v1 and v1alpha versions are registered.
+func Register(s GRPCServer) {
+ svr := NewServerV1(ServerOptions{Services: s})
+ v1alphareflectiongrpc.RegisterServerReflectionServer(s, asV1Alpha(svr))
+ v1reflectiongrpc.RegisterServerReflectionServer(s, svr)
}
-// protoMessage is used for type assertion on proto messages.
-// Generated proto message implements function Descriptor(), but Descriptor()
-// is not part of interface proto.Message. This interface is needed to
-// call Descriptor().
-type protoMessage interface {
- Descriptor() ([]byte, []int)
+// RegisterV1 registers only the v1 version of the server reflection service
+// on the given gRPC server. Many clients may only support v1alpha so most
+// users should use Register instead, at least until clients have upgraded.
+func RegisterV1(s GRPCServer) {
+ svr := NewServerV1(ServerOptions{Services: s})
+ v1reflectiongrpc.RegisterServerReflectionServer(s, svr)
}
-func (s *serverReflectionServer) getSymbols() (svcNames []string, symbolIndex map[string]*dpb.FileDescriptorProto) {
- s.initSymbols.Do(func() {
- serviceInfo := s.s.GetServiceInfo()
-
- s.symbols = map[string]*dpb.FileDescriptorProto{}
- s.serviceNames = make([]string, 0, len(serviceInfo))
- processed := map[string]struct{}{}
- for svc, info := range serviceInfo {
- s.serviceNames = append(s.serviceNames, svc)
- fdenc, ok := parseMetadata(info.Metadata)
- if !ok {
- continue
- }
- fd, err := decodeFileDesc(fdenc)
- if err != nil {
- continue
- }
- s.processFile(fd, processed)
- }
- sort.Strings(s.serviceNames)
- })
-
- return s.serviceNames, s.symbols
+// ServiceInfoProvider is an interface used to retrieve metadata about the
+// services to expose.
+//
+// The reflection service is only interested in the service names, but the
+// signature is this way so that *grpc.Server implements it. So it is okay
+// for a custom implementation to return zero values for the
+// grpc.ServiceInfo values in the map.
+//
+// # Experimental
+//
+// Notice: This type is EXPERIMENTAL and may be changed or removed in a
+// later release.
+type ServiceInfoProvider interface {
+ GetServiceInfo() map[string]grpc.ServiceInfo
}
-func (s *serverReflectionServer) processFile(fd *dpb.FileDescriptorProto, processed map[string]struct{}) {
- filename := fd.GetName()
- if _, ok := processed[filename]; ok {
- return
- }
- processed[filename] = struct{}{}
-
- prefix := fd.GetPackage()
-
- for _, msg := range fd.MessageType {
- s.processMessage(fd, prefix, msg)
- }
- for _, en := range fd.EnumType {
- s.processEnum(fd, prefix, en)
- }
- for _, ext := range fd.Extension {
- s.processField(fd, prefix, ext)
- }
- for _, svc := range fd.Service {
- svcName := fqn(prefix, svc.GetName())
- s.symbols[svcName] = fd
- for _, meth := range svc.Method {
- name := fqn(svcName, meth.GetName())
- s.symbols[name] = fd
- }
- }
-
- for _, dep := range fd.Dependency {
- fdenc := proto.FileDescriptor(dep)
- fdDep, err := decodeFileDesc(fdenc)
- if err != nil {
- continue
- }
- s.processFile(fdDep, processed)
- }
+// ExtensionResolver is the interface used to query details about extensions.
+// This interface is satisfied by protoregistry.GlobalTypes.
+//
+// # Experimental
+//
+// Notice: This type is EXPERIMENTAL and may be changed or removed in a
+// later release.
+type ExtensionResolver interface {
+ protoregistry.ExtensionTypeResolver
+ RangeExtensionsByMessage(message protoreflect.FullName, f func(protoreflect.ExtensionType) bool)
}
-func (s *serverReflectionServer) processMessage(fd *dpb.FileDescriptorProto, prefix string, msg *dpb.DescriptorProto) {
- msgName := fqn(prefix, msg.GetName())
- s.symbols[msgName] = fd
-
- for _, nested := range msg.NestedType {
- s.processMessage(fd, msgName, nested)
- }
- for _, en := range msg.EnumType {
- s.processEnum(fd, msgName, en)
- }
- for _, ext := range msg.Extension {
- s.processField(fd, msgName, ext)
- }
- for _, fld := range msg.Field {
- s.processField(fd, msgName, fld)
- }
- for _, oneof := range msg.OneofDecl {
- oneofName := fqn(msgName, oneof.GetName())
- s.symbols[oneofName] = fd
- }
+// ServerOptions represents the options used to construct a reflection server.
+//
+// # Experimental
+//
+// Notice: This type is EXPERIMENTAL and may be changed or removed in a
+// later release.
+type ServerOptions struct {
+ // The source of advertised RPC services. If not specified, the reflection
+ // server will report an empty list when asked to list services.
+ //
+ // This value will typically be a *grpc.Server. But the set of advertised
+ // services can be customized by wrapping a *grpc.Server or using an
+ // alternate implementation that returns a custom set of service names.
+ Services ServiceInfoProvider
+ // Optional resolver used to load descriptors. If not specified,
+ // protoregistry.GlobalFiles will be used.
+ DescriptorResolver protodesc.Resolver
+ // Optional resolver used to query for known extensions. If not specified,
+ // protoregistry.GlobalTypes will be used.
+ ExtensionResolver ExtensionResolver
}
-func (s *serverReflectionServer) processEnum(fd *dpb.FileDescriptorProto, prefix string, en *dpb.EnumDescriptorProto) {
- enName := fqn(prefix, en.GetName())
- s.symbols[enName] = fd
-
- for _, val := range en.Value {
- valName := fqn(enName, val.GetName())
- s.symbols[valName] = fd
- }
+// NewServer returns a reflection server implementation using the given options.
+// This can be used to customize behavior of the reflection service. Most usages
+// should prefer to use Register instead. For backwards compatibility reasons,
+// this returns the v1alpha version of the reflection server. For a v1 version
+// of the reflection server, see NewServerV1.
+//
+// # Experimental
+//
+// Notice: This function is EXPERIMENTAL and may be changed or removed in a
+// later release.
+func NewServer(opts ServerOptions) v1alphareflectiongrpc.ServerReflectionServer {
+ return asV1Alpha(NewServerV1(opts))
}
-func (s *serverReflectionServer) processField(fd *dpb.FileDescriptorProto, prefix string, fld *dpb.FieldDescriptorProto) {
- fldName := fqn(prefix, fld.GetName())
- s.symbols[fldName] = fd
-}
-
-func fqn(prefix, name string) string {
- if prefix == "" {
- return name
+// NewServerV1 returns a reflection server implementation using the given options.
+// This can be used to customize behavior of the reflection service. Most usages
+// should prefer to use Register instead.
+//
+// # Experimental
+//
+// Notice: This function is EXPERIMENTAL and may be changed or removed in a
+// later release.
+func NewServerV1(opts ServerOptions) v1reflectiongrpc.ServerReflectionServer {
+ if opts.DescriptorResolver == nil {
+ opts.DescriptorResolver = protoregistry.GlobalFiles
}
- return prefix + "." + name
-}
-
-// fileDescForType gets the file descriptor for the given type.
-// The given type should be a proto message.
-func (s *serverReflectionServer) fileDescForType(st reflect.Type) (*dpb.FileDescriptorProto, error) {
- m, ok := reflect.Zero(reflect.PtrTo(st)).Interface().(protoMessage)
- if !ok {
- return nil, fmt.Errorf("failed to create message from type: %v", st)
+ if opts.ExtensionResolver == nil {
+ opts.ExtensionResolver = protoregistry.GlobalTypes
}
- enc, _ := m.Descriptor()
-
- return decodeFileDesc(enc)
-}
-
-// decodeFileDesc does decompression and unmarshalling on the given
-// file descriptor byte slice.
-func decodeFileDesc(enc []byte) (*dpb.FileDescriptorProto, error) {
- raw, err := decompress(enc)
- if err != nil {
- return nil, fmt.Errorf("failed to decompress enc: %v", err)
- }
-
- fd := new(dpb.FileDescriptorProto)
- if err := proto.Unmarshal(raw, fd); err != nil {
- return nil, fmt.Errorf("bad descriptor: %v", err)
- }
- return fd, nil
-}
-
-// decompress does gzip decompression.
-func decompress(b []byte) ([]byte, error) {
- r, err := gzip.NewReader(bytes.NewReader(b))
- if err != nil {
- return nil, fmt.Errorf("bad gzipped descriptor: %v", err)
- }
- out, err := ioutil.ReadAll(r)
- if err != nil {
- return nil, fmt.Errorf("bad gzipped descriptor: %v", err)
- }
- return out, nil
-}
-
-func typeForName(name string) (reflect.Type, error) {
- pt := proto.MessageType(name)
- if pt == nil {
- return nil, fmt.Errorf("unknown type: %q", name)
- }
- st := pt.Elem()
-
- return st, nil
-}
-
-func fileDescContainingExtension(st reflect.Type, ext int32) (*dpb.FileDescriptorProto, error) {
- m, ok := reflect.Zero(reflect.PtrTo(st)).Interface().(proto.Message)
- if !ok {
- return nil, fmt.Errorf("failed to create message from type: %v", st)
- }
-
- var extDesc *proto.ExtensionDesc
- for id, desc := range proto.RegisteredExtensions(m) {
- if id == ext {
- extDesc = desc
- break
- }
- }
-
- if extDesc == nil {
- return nil, fmt.Errorf("failed to find registered extension for extension number %v", ext)
- }
-
- return decodeFileDesc(proto.FileDescriptor(extDesc.Filename))
-}
-
-func (s *serverReflectionServer) allExtensionNumbersForType(st reflect.Type) ([]int32, error) {
- m, ok := reflect.Zero(reflect.PtrTo(st)).Interface().(proto.Message)
- if !ok {
- return nil, fmt.Errorf("failed to create message from type: %v", st)
- }
-
- exts := proto.RegisteredExtensions(m)
- out := make([]int32, 0, len(exts))
- for id := range exts {
- out = append(out, id)
- }
- return out, nil
-}
-
-// fileDescEncodingByFilename finds the file descriptor for given filename,
-// does marshalling on it and returns the marshalled result.
-func (s *serverReflectionServer) fileDescEncodingByFilename(name string) ([]byte, error) {
- enc := proto.FileDescriptor(name)
- if enc == nil {
- return nil, fmt.Errorf("unknown file: %v", name)
- }
- fd, err := decodeFileDesc(enc)
- if err != nil {
- return nil, err
- }
- return proto.Marshal(fd)
-}
-
-// parseMetadata finds the file descriptor bytes specified meta.
-// For SupportPackageIsVersion4, m is the name of the proto file, we
-// call proto.FileDescriptor to get the byte slice.
-// For SupportPackageIsVersion3, m is a byte slice itself.
-func parseMetadata(meta interface{}) ([]byte, bool) {
- // Check if meta is the file name.
- if fileNameForMeta, ok := meta.(string); ok {
- return proto.FileDescriptor(fileNameForMeta), true
- }
-
- // Check if meta is the byte slice.
- if enc, ok := meta.([]byte); ok {
- return enc, true
- }
-
- return nil, false
-}
-
-// fileDescEncodingContainingSymbol finds the file descriptor containing the given symbol,
-// does marshalling on it and returns the marshalled result.
-// The given symbol can be a type, a service or a method.
-func (s *serverReflectionServer) fileDescEncodingContainingSymbol(name string) ([]byte, error) {
- _, symbols := s.getSymbols()
- fd := symbols[name]
- if fd == nil {
- // Check if it's a type name that was not present in the
- // transitive dependencies of the registered services.
- if st, err := typeForName(name); err == nil {
- fd, err = s.fileDescForType(st)
- if err != nil {
- return nil, err
- }
- }
- }
-
- if fd == nil {
- return nil, fmt.Errorf("unknown symbol: %v", name)
- }
-
- return proto.Marshal(fd)
-}
-
-// fileDescEncodingContainingExtension finds the file descriptor containing given extension,
-// does marshalling on it and returns the marshalled result.
-func (s *serverReflectionServer) fileDescEncodingContainingExtension(typeName string, extNum int32) ([]byte, error) {
- st, err := typeForName(typeName)
- if err != nil {
- return nil, err
- }
- fd, err := fileDescContainingExtension(st, extNum)
- if err != nil {
- return nil, err
- }
- return proto.Marshal(fd)
-}
-
-// allExtensionNumbersForTypeName returns all extension numbers for the given type.
-func (s *serverReflectionServer) allExtensionNumbersForTypeName(name string) ([]int32, error) {
- st, err := typeForName(name)
- if err != nil {
- return nil, err
- }
- extNums, err := s.allExtensionNumbersForType(st)
- if err != nil {
- return nil, err
- }
- return extNums, nil
-}
-
-// ServerReflectionInfo is the reflection service handler.
-func (s *serverReflectionServer) ServerReflectionInfo(stream rpb.ServerReflection_ServerReflectionInfoServer) error {
- for {
- in, err := stream.Recv()
- if err == io.EOF {
- return nil
- }
- if err != nil {
- return err
- }
-
- out := &rpb.ServerReflectionResponse{
- ValidHost: in.Host,
- OriginalRequest: in,
- }
- switch req := in.MessageRequest.(type) {
- case *rpb.ServerReflectionRequest_FileByFilename:
- b, err := s.fileDescEncodingByFilename(req.FileByFilename)
- if err != nil {
- out.MessageResponse = &rpb.ServerReflectionResponse_ErrorResponse{
- ErrorResponse: &rpb.ErrorResponse{
- ErrorCode: int32(codes.NotFound),
- ErrorMessage: err.Error(),
- },
- }
- } else {
- out.MessageResponse = &rpb.ServerReflectionResponse_FileDescriptorResponse{
- FileDescriptorResponse: &rpb.FileDescriptorResponse{FileDescriptorProto: [][]byte{b}},
- }
- }
- case *rpb.ServerReflectionRequest_FileContainingSymbol:
- b, err := s.fileDescEncodingContainingSymbol(req.FileContainingSymbol)
- if err != nil {
- out.MessageResponse = &rpb.ServerReflectionResponse_ErrorResponse{
- ErrorResponse: &rpb.ErrorResponse{
- ErrorCode: int32(codes.NotFound),
- ErrorMessage: err.Error(),
- },
- }
- } else {
- out.MessageResponse = &rpb.ServerReflectionResponse_FileDescriptorResponse{
- FileDescriptorResponse: &rpb.FileDescriptorResponse{FileDescriptorProto: [][]byte{b}},
- }
- }
- case *rpb.ServerReflectionRequest_FileContainingExtension:
- typeName := req.FileContainingExtension.ContainingType
- extNum := req.FileContainingExtension.ExtensionNumber
- b, err := s.fileDescEncodingContainingExtension(typeName, extNum)
- if err != nil {
- out.MessageResponse = &rpb.ServerReflectionResponse_ErrorResponse{
- ErrorResponse: &rpb.ErrorResponse{
- ErrorCode: int32(codes.NotFound),
- ErrorMessage: err.Error(),
- },
- }
- } else {
- out.MessageResponse = &rpb.ServerReflectionResponse_FileDescriptorResponse{
- FileDescriptorResponse: &rpb.FileDescriptorResponse{FileDescriptorProto: [][]byte{b}},
- }
- }
- case *rpb.ServerReflectionRequest_AllExtensionNumbersOfType:
- extNums, err := s.allExtensionNumbersForTypeName(req.AllExtensionNumbersOfType)
- if err != nil {
- out.MessageResponse = &rpb.ServerReflectionResponse_ErrorResponse{
- ErrorResponse: &rpb.ErrorResponse{
- ErrorCode: int32(codes.NotFound),
- ErrorMessage: err.Error(),
- },
- }
- } else {
- out.MessageResponse = &rpb.ServerReflectionResponse_AllExtensionNumbersResponse{
- AllExtensionNumbersResponse: &rpb.ExtensionNumberResponse{
- BaseTypeName: req.AllExtensionNumbersOfType,
- ExtensionNumber: extNums,
- },
- }
- }
- case *rpb.ServerReflectionRequest_ListServices:
- svcNames, _ := s.getSymbols()
- serviceResponses := make([]*rpb.ServiceResponse, len(svcNames))
- for i, n := range svcNames {
- serviceResponses[i] = &rpb.ServiceResponse{
- Name: n,
- }
- }
- out.MessageResponse = &rpb.ServerReflectionResponse_ListServicesResponse{
- ListServicesResponse: &rpb.ListServiceResponse{
- Service: serviceResponses,
- },
- }
- default:
- return status.Errorf(codes.InvalidArgument, "invalid MessageRequest: %v", in.MessageRequest)
- }
-
- if err := stream.Send(out); err != nil {
- return err
- }
+ return &internal.ServerReflectionServer{
+ S: opts.Services,
+ DescResolver: opts.DescriptorResolver,
+ ExtResolver: opts.ExtensionResolver,
}
}