mirror of
https://github.com/sofastack/sofa-rpc-node.git
synced 2026-01-18 15:55:54 +00:00
15 lines
333 B
JavaScript
15 lines
333 B
JavaScript
'use strict';
|
|
|
|
const Consumer = require('../../lib/client/consumer');
|
|
|
|
class CustomRpcConsumer extends Consumer {
|
|
createRequest(method, args, options) {
|
|
if (!this._isReady) {
|
|
throw new Error('consumer is not ready');
|
|
}
|
|
return super.createRequest(method, args, options);
|
|
}
|
|
}
|
|
|
|
module.exports = CustomRpcConsumer;
|