@@ -26,9 +26,27 @@ var TChannel = require('tchannel');
2626function main ( args ) {
2727 program
2828 . version ( require ( './package.json' ) . version )
29+
2930 . usage ( '[options]' )
30- . option ( '-l, --listen <listen>' , 'Host and port on which server listens (also node\'s identity in cluster)' )
31- . option ( '-h, --hosts <hosts>' , 'Seed file of list of hosts to join' )
31+
32+ . option ( '-l, --listen <listen>' ,
33+ 'Host and port on which server listens (also node\'s identity in cluster)' )
34+
35+ . option ( '-h, --hosts <hosts>' ,
36+ 'Seed file of list of hosts to join' )
37+
38+ . option ( '--suspect-period <suspectPeriod>' ,
39+ 'The lifetime of a suspect member in ms. After that the member becomes faulty.' ,
40+ parseInt10 , 5000 )
41+
42+ . option ( '--faulty-period <faultyPeriod>' ,
43+ 'The lifetime of a faulty member in ms. After that the member becomes a tombstone.' ,
44+ parseInt10 , 24 * 60 * 60 * 1000 ) // 24hours
45+
46+ . option ( '--tombstone-period <tombstonePeriod>' ,
47+ 'The lifetime of a tombstone member in ms. After that the member is removed from the membership.' ,
48+ parseInt10 , 5000 )
49+
3250 . parse ( args ) ;
3351
3452 var listen = program . listen ;
@@ -51,8 +69,9 @@ function main(args) {
5169 } ) ,
5270 isCrossPlatform : true ,
5371 stateTimeouts : {
54- faulty : 5 * 1000 , // 5s
55- tombstone : 5 * 1000 // 5s
72+ suspect : program . suspectPeriod ,
73+ faulty : program . faultyPeriod ,
74+ tombstone : program . tombstonePeriod ,
5675 }
5776 } ) ;
5877
@@ -68,6 +87,10 @@ function main(args) {
6887 }
6988}
7089
90+ function parseInt10 ( str ) {
91+ return parseInt ( str , 10 ) ;
92+ }
93+
7194function createLogger ( name ) {
7295 return {
7396 trace : function noop ( ) { } ,
0 commit comments