https://github.com/instance-oom/node-zookeeper-client-async
https://github.com/instance-oom/node-zookeeper-client-async
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/instance-oom/node-zookeeper-client-async
- Owner: instance-oom
- License: mit
- Created: 2023-09-05T02:56:06.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-13T01:20:46.000Z (over 2 years ago)
- Last Synced: 2025-03-01T12:07:54.499Z (10 months ago)
- Language: TypeScript
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
```bash
npm i @instance-oom/node-zookeeper-client-async
```
```ts
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();
```