Open gjohnson opened 10 years ago
Are you working on this? Do you want to support both the v1 and v2 APIs?
I'd be interested in taking a stab at implementing v2, but I don't want to duplicate work.
Yep, working on it right now. It's mostly all internal stuff, but if you have any thoughts or suggestions, drop them here!
But to answer your second question, no, it will only support v2.
Cool, a couple of things that might be worth changing or thinking about.
It would be nice to kill the singleton-only interface, maybe change to
module.exports = function(options) {
return new Client(options);
};
exports.Client = Client;
Using a URL instead of a host/port/ssl combination, this would allow the client to support multiple endpoints in the future.
var etcd = require('etcd');
var client = etcd({ url: 'http://localhost:4001' });
// future
var client = etcd({ url: ['http://example1:4001', 'http://example2:4001'] });
SSL client certification, benchmarks, etc...
Once you push your v2 changes I'll start hacking on some of this stuff.
@silas more of a rewrite now, so see the tests for examples of the new api. There are plenty of things to clean up still, so feel to add things / refactor / whatever. I am still not 100% happy with this API, so feel free to suggest anything.
Now that they have v2...