|
|
@ -36,12 +36,12 @@ package grpc.reflection.v1alpha; |
|
|
|
service ServerReflection { |
|
|
|
service ServerReflection { |
|
|
|
// The reflection service is structured as a bidirectional stream, ensuring |
|
|
|
// The reflection service is structured as a bidirectional stream, ensuring |
|
|
|
// all related requests go to a single server. |
|
|
|
// all related requests go to a single server. |
|
|
|
rpc DescriptorDatabaseInfo(stream DescriptorDatabaseRequest) |
|
|
|
rpc ServerReflectionInfo(stream ServerReflectionRequest) |
|
|
|
returns (stream DescriptorDatabaseResponse); |
|
|
|
returns (stream ServerReflectionResponse); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// The message sent by the client when calling DescriptorDatabaseInfo method. |
|
|
|
// The message sent by the client when calling ServerReflectionInfo method. |
|
|
|
message DescriptorDatabaseRequest { |
|
|
|
message ServerReflectionRequest { |
|
|
|
string host = 1; |
|
|
|
string host = 1; |
|
|
|
// To use reflection service, the client should set one of the following |
|
|
|
// To use reflection service, the client should set one of the following |
|
|
|
// fields in message_request. The server distinguishes requests by their |
|
|
|
// fields in message_request. The server distinguishes requests by their |
|
|
@ -83,18 +83,18 @@ message ExtensionRequest { |
|
|
|
int32 extension_number = 2; |
|
|
|
int32 extension_number = 2; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// The message sent by the server to answer DescriptorDatabaseInfo method. |
|
|
|
// The message sent by the server to answer ServerReflectionInfo method. |
|
|
|
message DescriptorDatabaseResponse { |
|
|
|
message ServerReflectionResponse { |
|
|
|
string valid_host = 1; |
|
|
|
string valid_host = 1; |
|
|
|
DescriptorDatabaseRequest original_request = 2; |
|
|
|
ServerReflectionRequest original_request = 2; |
|
|
|
// The server set one of the following fields accroding to the message_request |
|
|
|
// The server set one of the following fields accroding to the message_request |
|
|
|
// in the request. |
|
|
|
// in the request. |
|
|
|
oneof message_response { |
|
|
|
oneof message_response { |
|
|
|
// A serialized FileDescriptorProto message. We avoid taking a dependency on |
|
|
|
// This message is used to answer file_by_filename, file_containing_symbol, |
|
|
|
// descriptor.proto, which uses proto2 only features, by making them opaque |
|
|
|
// file_containing_extension requests with transitive dependencies. As |
|
|
|
// bytes instead. This message is used to answer file_by_filename, |
|
|
|
// the repeated label is not allowed in oneof fields, we use a |
|
|
|
// file_containing_symbol, file_containing_extension requests. |
|
|
|
// FileDescriptorResponse message to encapsulate the repeated fields. |
|
|
|
bytes file_descriptor_proto = 4; |
|
|
|
FileDescriptorResponse file_descriptor_response = 4; |
|
|
|
|
|
|
|
|
|
|
|
// This message is used to answer all_extension_numbers_of_type requst. |
|
|
|
// This message is used to answer all_extension_numbers_of_type requst. |
|
|
|
ExtensionNumberResponse all_extension_numbers_response = 5; |
|
|
|
ExtensionNumberResponse all_extension_numbers_response = 5; |
|
|
@ -107,6 +107,16 @@ message DescriptorDatabaseResponse { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 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 |
|
|
|
// A list of extension numbers sent by the server answering |
|
|
|
// all_extension_numbers_of_type request. |
|
|
|
// all_extension_numbers_of_type request. |
|
|
|
message ExtensionNumberResponse { |
|
|
|
message ExtensionNumberResponse { |
|
|
@ -116,11 +126,19 @@ message ExtensionNumberResponse { |
|
|
|
repeated int32 extension_number = 2; |
|
|
|
repeated int32 extension_number = 2; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// A list of service names sent by the server answering list_services request. |
|
|
|
// A list of ServiceResponse sent by the server answering list_services request. |
|
|
|
message ListServiceResponse { |
|
|
|
message ListServiceResponse { |
|
|
|
// Full names of registered services, including package names. The format |
|
|
|
// 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> |
|
|
|
// is <package>.<service> |
|
|
|
repeated string service = 1; |
|
|
|
string name = 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// The error code and error message sent by the server when an error occurs. |
|
|
|
// The error code and error message sent by the server when an error occurs. |
|
|
|