
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
This module loads etcd's rpc.proto
file so that you can access the gRPC API from Node.
More importantly, it brings together all the other .proto
files necessary to load it.
You can use this module as a client to etcd, but you will probably want to wrap some code around it for more functionality (e.g. failover to other server instances).
npm install etcd-rpc grpc
Example client:
const grpc = require('grpc');
const etcd = require('etcd-rpc');
const client = new etcd.KV('etcd.server.hostname:2379', grpc.credentials.createInsecure());
client.put({
key: new Buffer('foo'),
value: new Buffer('foofoo'),
}, function (err) {
if (err) {
throw err;
}
});
client.range({
key: new Buffer('foo'),
}, function (err, res) {
if (err) {
throw err;
}
res.kvs.forEach(function (o) {
console.log(o.key.toString(), '->', o.value.toString());
});
});
Example watcher client:
const grpc = require('grpc');
const etcd = require('etcd-rpc');
const client = new etcd.Watch('etcd.server.hostname:2379', grpc.credentials.createInsecure());
const stream = client.watch();
stream.on('data', function (data) {
const id = data.watch_id;
console.log('Created:', data);
stream.removeAllListeners('data');
stream.on('data', function (data) {
data.events.forEach(function (ev) {
console.log([ev.type, ev.kv.key.toString(), ev.kv.value.toString()]);
});
});
setTimeout(function() {
stream.on('data', function (data) {
console.log('Cancelled:', data);
stream.end();
});
stream.write({ cancel_request: { watch_id: id } });
}, 10000);
});
stream.on('error', function (err) {
throw err;
});
const ALL = new Buffer('\0');
stream.write({ create_request: { key: ALL, range_end: ALL } });
See rpc.proto for more information.
FAQs
Node library to access etcd's gRPC API.
The npm package etcd-rpc receives a total of 0 weekly downloads. As such, etcd-rpc popularity was classified as not popular.
We found that etcd-rpc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.