Skip to content

Commit

Permalink
Autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
jfmengels committed Mar 23, 2018
1 parent 8bcf824 commit 366c658
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 35 deletions.
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

0 comments on commit 366c658

Please sign in to comment.