我想知道如何在DeepStream中进行动态 RPC 调用?例如,当订阅者调用 url http://localhost/myRPCApp/123时,这里的 123 可以是任何东西。那么如何注册提供者方法呢?
例如:
client.rpc.make(<MY-DYNAMIC-URL>, { patientId: 2 }, (error, result) =>{
console.log(error, result);
})
在提供者上:
client.rpc.provide(<MY-DYNAMIC-URL>, (data, response) => {
response.send('Hey there!');
})
我怎样才能做到这一点?