345316222
345316222
``` module.exports = () => { return { `${app1}.rpc.service.url`: '127.0.0.1:12202', `${app2}.rpc.service.url`: '127.0.0.1:12204', }; }; ``` 这个是写在哪个文件上的? config文件上吗? ``` const rpc = { client: { serverHost: { 'book_rpc.rpc.service.url': '127.0.0.1:12201', // book服务...
> gateway 的话,一般两种做法 > > 1. 完全泛化的(固定的结构 + JSON) > 2. 网关自己提供类型注册的能力,然后客户端和服务端都能消费 eggjs + zookeeper , 怎么实现完全泛化的?不需要引入.proto文件。直接在网关用这段话可以吗? ``` js const consumer = app.rpcClient.createConsumer({ interfaceName: 'com.alipay.sofa.rpc.protobuf.aServer', targetAppName: 'aServer', version: '1.0', group:...