Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

poolee

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

poolee - npm Package Compare versions

Comparing version 0.4.6 to 0.4.7

test/integration_test.js

7

lib/endpoint.js

@@ -22,2 +22,3 @@ var Stream = require('stream')

// keepAlive: use an alternate Agent that does keep-alive properly (boolean) default false
// agentOptions: {} an object for passing options directly to the Http Agent
// }

@@ -43,10 +44,10 @@ function Endpoint(protocol, ip, port, options) {

if (protocol === http) {
this.agent = new KeepAlive()
this.agent = new KeepAlive(options.agentOptions)
}
else {
this.agent = new KeepAlive.Secure()
this.agent = new KeepAlive.Secure(options.agentOptions)
}
}
else {
this.agent = new protocol.Agent()
this.agent = new protocol.Agent(options.agentOptions)
}

@@ -53,0 +54,0 @@ this.agent.maxSockets = options.maxSockets || 20

@@ -19,2 +19,3 @@ module.exports = function (inherits, EventEmitter, Endpoint, RequestSet) {

// maxRetries: number (default = 5)
// agentOptions: {} an object for passing options directly to the Http Agent
// }

@@ -21,0 +22,0 @@ function Pool(http, nodes, options) {

{
"name": "poolee",
"version": "0.4.6",
"version": "0.4.7",
"description": "HTTP pool and load balancer",

@@ -5,0 +5,0 @@ "homepage": "http://github.com/dannycoates/poolee",

@@ -73,2 +73,3 @@ # poolee

, name: undefined // optional string
, agentOptions: undefined// an object for passing options directly to the Http Agent
}

@@ -127,2 +128,7 @@ )

###### agentOptions
These options are passed directly to the underlying Agents used in the pool. This
is nice for passing options like `cert` and `key` that are required for client certificates.
###### ping

@@ -129,0 +135,0 @@

@@ -5,2 +5,3 @@ var assert = require("assert")

var http = require('http')
var https = require('https')
var Stream = require('stream')

@@ -15,2 +16,25 @@

it("passes nothing to the Agent constructor when no agentOptions are given", function () {
var e = new Endpoint(http, '127.0.0.1', 6969, { bogus: true })
assert.equal(e.agent.options.bogus, undefined)
})
it("passes agentOptions to the underlying Agent (no keep-alive)", function () {
var e = new Endpoint(http, '127.0.0.1', 6969, { agentOptions: { cert: 'foo', key: 'bar'}})
assert.equal(e.agent.options.cert, 'foo')
assert.equal(e.agent.options.key, 'bar')
})
it("passes agentOptions to the underlying Agent (keep-alive)", function () {
var e = new Endpoint(http, '127.0.0.1', 6969, {keepAlive: true, agentOptions: { cert: 'foo', key: 'bar'}})
assert.equal(e.agent.options.cert, 'foo')
assert.equal(e.agent.options.key, 'bar')
})
it("passes agentOptions to the underlying Agent (keep-alive secure)", function () {
var e = new Endpoint(https, '127.0.0.1', 6969, {keepAlive: true, agentOptions: { cert: 'foo', key: 'bar'}})
assert.equal(e.agent.options.cert, 'foo')
assert.equal(e.agent.options.key, 'bar')
})
//

@@ -17,0 +41,0 @@ // unhealthy

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc