Skip to content

Commit

Permalink
Merge 366c658 into ec593db
Browse files Browse the repository at this point in the history
  • Loading branch information
jfmengels committed Mar 23, 2018
2 parents ec593db + 366c658 commit 91f4614
Show file tree
Hide file tree
Showing 4 changed files with 228 additions and 165 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"rxjs": "^5.5.6"
},
"devDependencies": {
"@coorpacademy/eslint-plugin-coorpacademy": "^7.0.2",
"@coorpacademy/eslint-plugin-coorpacademy": "^8.1.1",
"ava": "^0.25.0",
"babel-cli": "^6.18.0",
"babel-core": "^6.18.2",
Expand All @@ -56,7 +56,7 @@
"babel-preset-stage-1": "^6.16.0",
"babel-register": "^6.18.0",
"coveralls": "^3.0.0",
"eslint": "^4.17.0",
"eslint": "^4.19.1",
"nyc": "^11.4.1"
},
"ava": {
Expand Down
16 changes: 7 additions & 9 deletions src/bin/helper/etcd.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ import {readFileSync} from 'fs';
import {resolve} from 'path';
import {Etcd3} from 'etcd3';

const createEtcd = (
{
hosts,
username,
password,
rootCertificate,
const createEtcd = ({
hosts,
username,
password,
rootCertificate,

namespace = ''
} = {}
) => {
namespace = ''
} = {}) => {
const auth =
!!username || !!password
? {
Expand Down
50 changes: 24 additions & 26 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,30 @@ import createAPI from './api';

const debug = createDebug('squirrel');

const createSquirrel = (
{
// etcd
hosts = ['http://127.0.0.1:2379'],
credentials,
auth,
namespace = '',

// fs
fallback,
preloadedStore,
save = true,

// index
indexes = [],

// ETCD3 lib options
// see https://github.com/mixer/etcd3/blob/master/src/options.ts
retry = false,
dialTimeout = 30 * 1000,
// grpc options
// see https://grpc.io/grpc/cpp/group__grpc__arg__keys.html for available config keys
// and https://github.com/mixer/etcd3/blob/master/src/types/grpc.d.ts for default values
grpcOptions = {}
} = {}
) => {
const createSquirrel = ({
// etcd
hosts = ['http://127.0.0.1:2379'],
credentials,
auth,
namespace = '',

// fs
fallback,
preloadedStore,
save = true,

// index
indexes = [],

// ETCD3 lib options
// see https://github.com/mixer/etcd3/blob/master/src/options.ts
retry = false,
dialTimeout = 30 * 1000,
// grpc options
// see https://grpc.io/grpc/cpp/group__grpc__arg__keys.html for available config keys
// and https://github.com/mixer/etcd3/blob/master/src/types/grpc.d.ts for default values
grpcOptions = {}
} = {}) => {
debug('Init');

const client = new Etcd3({
Expand Down
Loading

0 comments on commit 91f4614

Please sign in to comment.