sofastack / sofa-rpc-node

SOFARPC Node is a high-performance, high-extensibility, production-level Nodejs RPC framework.
MIT License
612 stars 64 forks source link

add zk authInfo support #51

Closed xusd320 closed 5 years ago

xusd320 commented 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' }, });

gxcsoccer commented 5 years ago

多谢 PR

gxcsoccer commented 5 years ago

我在 https://github.com/sofastack/sofa-rpc-node/pull/52 这里加了单测