memstore-cluster -> cluster-store
This commit is contained in:
		
							父節點
							
								
									d1814341a5
								
							
						
					
					
						當前提交
						f89e50baa3
					
				
							
								
								
									
										16
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								index.js
									
									
									
									
									
								
							@ -11,29 +11,21 @@ var path = require('path');
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
var cluster = require('cluster');
 | 
					var cluster = require('cluster');
 | 
				
			||||||
var numCores = require('os').cpus().length;
 | 
					var numCores = require('os').cpus().length;
 | 
				
			||||||
 | 
					//var count = 0;
 | 
				
			||||||
var defaults = {
 | 
					var defaults = {
 | 
				
			||||||
  oauth3: 'oauth3.org'
 | 
					  oauth3: 'oauth3.org'
 | 
				
			||||||
, debug: false
 | 
					, debug: false
 | 
				
			||||||
, acmeChallengeDns: '_acme-challenge.' // _acme-challenge.example.com TXT xxxxxxxxxxxxxxxx
 | 
					, acmeChallengeDns: '_acme-challenge.' // _acme-challenge.example.com TXT xxxxxxxxxxxxxxxx
 | 
				
			||||||
, memstoreConfig: {
 | 
					, memstoreConfig: {
 | 
				
			||||||
    sock: '/tmp/memstore.sock'
 | 
					    name: 'le-dns'
 | 
				
			||||||
 | 
					 | 
				
			||||||
    // If left 'null' or 'undefined' this defaults to a similar memstore
 | 
					 | 
				
			||||||
    // with no special logic for 'cookie' or 'expires'
 | 
					 | 
				
			||||||
  , store: null
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // a good default to use for instances where you might want
 | 
					 | 
				
			||||||
    // to cluster or to run standalone, but with the same API
 | 
					 | 
				
			||||||
  , serve: cluster.isMaster
 | 
					 | 
				
			||||||
  , connect: cluster.isWorker
 | 
					 | 
				
			||||||
  , standalone: (1 === numCores) // overrides serve and connect
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var Challenge = module.exports;
 | 
					var Challenge = module.exports;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Challenge.create = function (options) {
 | 
					Challenge.create = function (options) {
 | 
				
			||||||
  var store = require('memstore-cluster');
 | 
					  // count += 1;
 | 
				
			||||||
 | 
					  var store = require('cluster-store');
 | 
				
			||||||
  var results = {};
 | 
					  var results = {};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Object.keys(Challenge).forEach(function (key) {
 | 
					  Object.keys(Challenge).forEach(function (key) {
 | 
				
			||||||
 | 
				
			|||||||
@ -29,9 +29,9 @@
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  "homepage": "https://github.com/Daplie/le-challenge-dns#readme",
 | 
					  "homepage": "https://github.com/Daplie/le-challenge-dns#readme",
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
 | 
					    "cluster-store": "^2.0.4",
 | 
				
			||||||
    "daplie-dns": "git+https://github.com/Daplie/daplie-cli-dns.git#master",
 | 
					    "daplie-dns": "git+https://github.com/Daplie/daplie-cli-dns.git#master",
 | 
				
			||||||
    "daplie-domains": "git+https://github.com/Daplie/daplie-cli-domains.git#master",
 | 
					    "daplie-domains": "git+https://github.com/Daplie/daplie-cli-domains.git#master",
 | 
				
			||||||
    "memstore-cluster": "^1.0.0",
 | 
					 | 
				
			||||||
    "oauth3-cli": "git+https://github.com/OAuth3/oauth3-cli.git#master"
 | 
					    "oauth3-cli": "git+https://github.com/OAuth3/oauth3-cli.git#master"
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user