UNPKG

@coorpacademy/squirrel

Version:
32 lines (28 loc) 638 B
"use strict"; exports.__esModule = true; exports.default = void 0; var _etcd = require("@coorpacademy/etcd3"); const createEtcd = ({ hosts, username, password, rootCertificate, namespace = '' } = {}) => { const auth = !!username || !!password ? { username, password } : null; const credentials = rootCertificate ? { rootCertificate: Buffer.from(rootCertificate) } : null; const client = new _etcd.Etcd3({ hosts: (hosts || 'http://127.0.0.1:2379').split(','), auth, credentials }); return client; }; var _default = createEtcd; exports.default = _default; //# sourceMappingURL=etcd.js.map