Closed xusd320 closed 5 years ago
连接zk时可能需要acl认证支持。配合zookeeper-cluster-client,在registry的配置信息中添加authInfo,即可自动调用node-zookeeper-client的addAuthInfo方法进行认证。示例:
const { ZookeeperRegistry } = require('sofa-rpc-node').registry;
// create zk registry client const registry = new ZookeeperRegistry({ address: '127.0.0.1:2181', authInfo: { scheme: 'digest', auth: 'user:password' }, });
多谢 PR
我在 https://github.com/sofastack/sofa-rpc-node/pull/52 这里加了单测
连接zk时可能需要acl认证支持。配合zookeeper-cluster-client,在registry的配置信息中添加authInfo,即可自动调用node-zookeeper-client的addAuthInfo方法进行认证。示例:
const { ZookeeperRegistry } = require('sofa-rpc-node').registry;
// create zk registry client const registry = new ZookeeperRegistry({ address: '127.0.0.1:2181', authInfo: { scheme: 'digest', auth: 'user:password' }, });