mirror of
https://github.com/sofastack/sofa-rpc-node.git
synced 2026-01-18 15:55:54 +00:00
19 lines
433 B
JavaScript
19 lines
433 B
JavaScript
'use strict';
|
|
|
|
const assert = require('assert');
|
|
const RpcClient = require('./client');
|
|
const GRpcConnection = require('./connection/grpc');
|
|
|
|
const defaultOptions = {
|
|
connectionClass: GRpcConnection,
|
|
};
|
|
|
|
class GRpcClient extends RpcClient {
|
|
constructor(options = {}) {
|
|
assert(options.proto, '[GRpcClient] options.proto is required');
|
|
super(Object.assign({}, defaultOptions, options));
|
|
}
|
|
}
|
|
|
|
module.exports = GRpcClient;
|