How to use the @grpc/grpc-js.makeGenericClientConstructor function in @grpc/grpc-js

To help you get started, we’ve selected a few @grpc/grpc-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hyperledger / burrow / js / proto / rpcevents_grpc_pb.js View on Github external
// GetEvents provides events streaming one block at a time - that is all events emitted in a particular block
// are guaranteed to be delivered in each GetEventsResponse
events: {
    path: '/rpcevents.ExecutionEvents/Events',
    requestStream: false,
    responseStream: true,
    requestType: rpcevents_pb.BlocksRequest,
    responseType: rpcevents_pb.EventsResponse,
    requestSerialize: serialize_rpcevents_BlocksRequest,
    requestDeserialize: deserialize_rpcevents_BlocksRequest,
    responseSerialize: serialize_rpcevents_EventsResponse,
    responseDeserialize: deserialize_rpcevents_EventsResponse,
  },
};

exports.ExecutionEventsClient = grpc.makeGenericClientConstructor(ExecutionEventsService);
github hyperledger / burrow / js / proto / rpctransact_grpc_pb.js View on Github external
},
  // Formulate a NameTx signed server-side
nameTxAsync: {
    path: '/rpctransact.Transact/NameTxAsync',
    requestStream: false,
    responseStream: false,
    requestType: payload_pb.NameTx,
    responseType: txs_pb.Receipt,
    requestSerialize: serialize_payload_NameTx,
    requestDeserialize: deserialize_payload_NameTx,
    responseSerialize: serialize_txs_Receipt,
    responseDeserialize: deserialize_txs_Receipt,
  },
};

exports.TransactClient = grpc.makeGenericClientConstructor(TransactService);
github cjihrig / grpc-server-js / test / server.js View on Github external
before(async () => {
        server = new Server();

        server.addService(stringServiceAttrs, {
          capitalize (call, callback) {
            callback(null, capitalize(call.request));
          }
        });

        const port = await server.bind('localhost:0', serverInsecureCreds);
        server.start();
        const Client = Grpc.makeGenericClientConstructor(stringServiceAttrs);
        client = new Client(`localhost:${port}`, clientInsecureCreds);
      });
github cjihrig / grpc-server-js / test / errors.js View on Github external
path: '/TestService/ServerStream',
          requestStream: false,
          responseStream: true,
          requestSerialize: identity,
          responseDeserialize: identity
        },
        bidiStream: {
          path: '/TestService/BidiStream',
          requestStream: true,
          responseStream: true,
          requestSerialize: identity,
          responseDeserialize: identity
        }
      };

      const Client = Grpc.makeGenericClientConstructor(testServiceAttrs, 'TestService');

      misbehavingClient = new Client(`localhost:${port}`, clientInsecureCreds);
    });
github hyperledger / burrow / js / proto / tendermint / abci / types_grpc_pb.js View on Github external
responseDeserialize: deserialize_tendermint_abci_ResponseLoadSnapshotChunk,
  },
  applySnapshotChunk: {
    path: '/tendermint.abci.ABCIApplication/ApplySnapshotChunk',
    requestStream: false,
    responseStream: false,
    requestType: tendermint_abci_types_pb.RequestApplySnapshotChunk,
    responseType: tendermint_abci_types_pb.ResponseApplySnapshotChunk,
    requestSerialize: serialize_tendermint_abci_RequestApplySnapshotChunk,
    requestDeserialize: deserialize_tendermint_abci_RequestApplySnapshotChunk,
    responseSerialize: serialize_tendermint_abci_ResponseApplySnapshotChunk,
    responseDeserialize: deserialize_tendermint_abci_ResponseApplySnapshotChunk,
  },
};

exports.ABCIApplicationClient = grpc.makeGenericClientConstructor(ABCIApplicationService);
github hyperledger / burrow / js / proto / tendermint / rpc / grpc / types_grpc_pb.js View on Github external
responseDeserialize: deserialize_tendermint_rpc_grpc_ResponsePing,
  },
  broadcastTx: {
    path: '/tendermint.rpc.grpc.BroadcastAPI/BroadcastTx',
    requestStream: false,
    responseStream: false,
    requestType: tendermint_rpc_grpc_types_pb.RequestBroadcastTx,
    responseType: tendermint_rpc_grpc_types_pb.ResponseBroadcastTx,
    requestSerialize: serialize_tendermint_rpc_grpc_RequestBroadcastTx,
    requestDeserialize: deserialize_tendermint_rpc_grpc_RequestBroadcastTx,
    responseSerialize: serialize_tendermint_rpc_grpc_ResponseBroadcastTx,
    responseDeserialize: deserialize_tendermint_rpc_grpc_ResponseBroadcastTx,
  },
};

exports.BroadcastAPIClient = grpc.makeGenericClientConstructor(BroadcastAPIService);
github hyperledger / burrow / js / proto / rpcquery_grpc_pb.js View on Github external
responseDeserialize: deserialize_rpcquery_Stats,
  },
  getBlockHeader: {
    path: '/rpcquery.Query/GetBlockHeader',
    requestStream: false,
    responseStream: false,
    requestType: rpcquery_pb.GetBlockParam,
    responseType: tendermint_types_types_pb.Header,
    requestSerialize: serialize_rpcquery_GetBlockParam,
    requestDeserialize: deserialize_rpcquery_GetBlockParam,
    responseSerialize: serialize_tendermint_types_Header,
    responseDeserialize: deserialize_tendermint_types_Header,
  },
};

exports.QueryClient = grpc.makeGenericClientConstructor(QueryService);
github hyperledger / burrow / js / proto / rpcdump_grpc_pb.js View on Github external
var DumpService = exports.DumpService = {
  getDump: {
    path: '/rpcdump.Dump/GetDump',
    requestStream: false,
    responseStream: true,
    requestType: rpcdump_pb.GetDumpParam,
    responseType: dump_pb.Dump,
    requestSerialize: serialize_rpcdump_GetDumpParam,
    requestDeserialize: deserialize_rpcdump_GetDumpParam,
    responseSerialize: serialize_dump_Dump,
    responseDeserialize: deserialize_dump_Dump,
  },
};

exports.DumpClient = grpc.makeGenericClientConstructor(DumpService);
github hyperledger / burrow / js / proto / keys_grpc_pb.js View on Github external
responseDeserialize: deserialize_keys_ListResponse,
  },
  addName: {
    path: '/keys.Keys/AddName',
    requestStream: false,
    responseStream: false,
    requestType: keys_pb.AddNameRequest,
    responseType: keys_pb.AddNameResponse,
    requestSerialize: serialize_keys_AddNameRequest,
    requestDeserialize: deserialize_keys_AddNameRequest,
    responseSerialize: serialize_keys_AddNameResponse,
    responseDeserialize: deserialize_keys_AddNameResponse,
  },
};

exports.KeysClient = grpc.makeGenericClientConstructor(KeysService);