0.0.2 • Published 8 months ago

@instance-oom/node-zookeeper-client-async v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago
npm i @instance-oom/node-zookeeper-client-async
const zookeeper = require('@instance-oom/node-zookeeper-client-async');

const main = async () => {
  const client = zookeeper.createClient('127.0.0.1:2181');
  await client.connectAsync();

  const exists = await client.existsAsync(nodePath);
  console.log('exists', exists?.ctime?.toString('hex'));

  const { data, stat } = await client.getDataAsync(nodePath);
  console.log('getDataAsync', data.toString(), stat);

  await client.setDataAsync(nodePath, Buffer.from('xxx'));
}
main();
0.0.2

8 months ago

0.0.1

8 months ago