New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

aplomb

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aplomb

configurable scheduling and balancing for Node.js.

latest
Source
npmnpm
Version
0.0.8
Version published
Maintainers
1
Created
Source

Balance connections across sharded buckets.

Usage:

Create a router with some delegates and a key extraction function.

var Aplomb = require('./aplomb')

var aplomb = new Aplomb({
    bucketCount: 256,
    compare: function (a, b) { return a - b },
    extract: function (connection) { // extract key from connection
        return connection.key }
})

Add a delegate and we'll give you a delegation.

var delegation = aplomb.addDelegate('http://192.173.0.14:2381')

aplomb.addDelegation(1, delegation) // 1 is the key for this delegation

delegation = aplomb.replaceDelegate('http://192.173.0.14:2381', 'http://localhost:5000')

aplomb.addConnection(3, { key: 'soup' } )

aplomb.addDelegation(2, delegation)

Use evictable to sniff out dead connections.

    var old;
    while (old = aplomb.evictable('http://192.173.0.14:2381')) {
        console.log(old)
    }

FAQs

Package last updated on 15 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts