|
| 1 | +// GENERATED CODE -- DO NOT EDIT! |
| 2 | + |
| 3 | +// Original file comments: |
| 4 | +// Copyright 2016 The gRPC Authors |
| 5 | +// |
| 6 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | +// you may not use this file except in compliance with the License. |
| 8 | +// You may obtain a copy of the License at |
| 9 | +// |
| 10 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +// |
| 12 | +// Unless required by applicable law or agreed to in writing, software |
| 13 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | +// See the License for the specific language governing permissions and |
| 16 | +// limitations under the License. |
| 17 | +// |
| 18 | +// Service exported by server reflection. A more complete description of how |
| 19 | +// server reflection works can be found at |
| 20 | +// https://github.com/grpc/grpc/blob/master/doc/server-reflection.md |
| 21 | +// |
| 22 | +// The canonical version of this proto can be found at |
| 23 | +// https://github.com/grpc/grpc-proto/blob/master/grpc/reflection/v1/reflection.proto |
| 24 | +// |
| 25 | +'use strict'; |
| 26 | +var grpc = require('@postman/grpc-js'); |
| 27 | +var reflection_pb = require('./reflection_pb.js'); |
| 28 | + |
| 29 | +function serialize_grpc_reflection_v1_ServerReflectionRequest(arg) { |
| 30 | + if (!(arg instanceof reflection_pb.ServerReflectionRequest)) { |
| 31 | + throw new Error('Expected argument of type grpc.reflection.v1.ServerReflectionRequest'); |
| 32 | + } |
| 33 | + return Buffer.from(arg.serializeBinary()); |
| 34 | +} |
| 35 | + |
| 36 | +function deserialize_grpc_reflection_v1_ServerReflectionRequest(buffer_arg) { |
| 37 | + return reflection_pb.ServerReflectionRequest.deserializeBinary(new Uint8Array(buffer_arg)); |
| 38 | +} |
| 39 | + |
| 40 | +function serialize_grpc_reflection_v1_ServerReflectionResponse(arg) { |
| 41 | + if (!(arg instanceof reflection_pb.ServerReflectionResponse)) { |
| 42 | + throw new Error('Expected argument of type grpc.reflection.v1.ServerReflectionResponse'); |
| 43 | + } |
| 44 | + return Buffer.from(arg.serializeBinary()); |
| 45 | +} |
| 46 | + |
| 47 | +function deserialize_grpc_reflection_v1_ServerReflectionResponse(buffer_arg) { |
| 48 | + return reflection_pb.ServerReflectionResponse.deserializeBinary(new Uint8Array(buffer_arg)); |
| 49 | +} |
| 50 | + |
| 51 | + |
| 52 | +var ServerReflectionService = exports.ServerReflectionService = { |
| 53 | + // The reflection service is structured as a bidirectional stream, ensuring |
| 54 | +// all related requests go to a single server. |
| 55 | +serverReflectionInfo: { |
| 56 | + path: '/grpc.reflection.v1.ServerReflection/ServerReflectionInfo', |
| 57 | + requestStream: true, |
| 58 | + responseStream: true, |
| 59 | + requestType: reflection_pb.ServerReflectionRequest, |
| 60 | + responseType: reflection_pb.ServerReflectionResponse, |
| 61 | + requestSerialize: serialize_grpc_reflection_v1_ServerReflectionRequest, |
| 62 | + requestDeserialize: deserialize_grpc_reflection_v1_ServerReflectionRequest, |
| 63 | + responseSerialize: serialize_grpc_reflection_v1_ServerReflectionResponse, |
| 64 | + responseDeserialize: deserialize_grpc_reflection_v1_ServerReflectionResponse, |
| 65 | + }, |
| 66 | +}; |
| 67 | + |
| 68 | +exports.ServerReflectionClient = grpc.makeGenericClientConstructor(ServerReflectionService, 'ServerReflection'); |
0 commit comments