Socket
Socket
Sign inDemoInstall

redis-connection-pool

Package Overview
Dependencies
12
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.0.1

9

dist/index.d.ts

@@ -19,6 +19,7 @@ /**

import { Pool } from 'generic-pool';
interface RedisConnectionPoolConfig {
export interface RedisConnectionPoolConfig {
max_clients?: number;
perform_checks?: boolean;
}
export default function redisConnectionPoolFactory(uid: string, cfg?: RedisConnectionPoolConfig, redisCfg?: RedisClientOptions): any;
/**

@@ -43,6 +44,6 @@ * Function: redisConnectionPoolFactory

*
* cfg.max_clients - (number) - Max clients alive in the connection pool at
* cfg.max_clients - (number) - Max clients alive in the connection pool at
* once. (default: 30)
*
* cfg.perform_checks - (boolean) - Perform a series of redis checks,
* cfg.perform_checks - (boolean) - Perform a series of redis checks,
* currently this checks to to see if

@@ -58,3 +59,2 @@ * blocking push/pops can be used.

*/
export default function redisConnectionPoolFactory(uid: string, cfg?: RedisConnectionPoolConfig, redisCfg?: RedisClientOptions): any;
export declare class RedisConnectionPool {

@@ -270,2 +270,1 @@ uid: string;

}
export {};

@@ -37,2 +37,9 @@ "use strict";

const connectionPools = new Map();
function redisConnectionPoolFactory(uid, cfg = {}, redisCfg = {}) {
if (!connectionPools.has(uid)) {
connectionPools.set(uid, new RedisConnectionPool(uid, cfg, redisCfg));
}
return connectionPools.get(uid);
}
exports.default = redisConnectionPoolFactory;
/**

@@ -57,6 +64,6 @@ * Function: redisConnectionPoolFactory

*
* cfg.max_clients - (number) - Max clients alive in the connection pool at
* cfg.max_clients - (number) - Max clients alive in the connection pool at
* once. (default: 30)
*
* cfg.perform_checks - (boolean) - Perform a series of redis checks,
* cfg.perform_checks - (boolean) - Perform a series of redis checks,
* currently this checks to to see if

@@ -72,9 +79,2 @@ * blocking push/pops can be used.

*/
function redisConnectionPoolFactory(uid, cfg = {}, redisCfg = {}) {
if (!connectionPools.has(uid)) {
connectionPools.set(uid, new RedisConnectionPool(uid, cfg, redisCfg));
}
return connectionPools.get(uid);
}
exports.default = redisConnectionPoolFactory;
class RedisConnectionPool {

@@ -81,0 +81,0 @@ constructor(uid, cfg = {}, redisCfg = {}) {

{
"name": "redis-connection-pool",
"version": "2.0.0",
"version": "2.0.1",
"description": "a redis client connection pool",

@@ -36,16 +36,16 @@ "license": "MIT",

"devDependencies": {
"@babel/cli": "^7.17.6",
"@babel/core": "^7.17.8",
"@babel/preset-env": "^7.16.11",
"@babel/preset-typescript": "^7.16.7",
"@types/eslint": "^8.4.1",
"@types/generic-pool": "^3.1.10",
"@types/node": "^17.0.23",
"@types/redis": "^4.0.11",
"@typescript-eslint/parser": "^5.16.0",
"eslint": "^8.11.0",
"@babel/cli": "7.17.6",
"@babel/core": "7.17.8",
"@babel/preset-env": "7.16.11",
"@babel/preset-typescript": "7.16.7",
"@types/eslint": "8.4.1",
"@types/generic-pool": "3.1.10",
"@types/node": "17.0.23",
"@types/redis": "4.0.11",
"@typescript-eslint/parser": "5.16.0",
"eslint": "8.11.0",
"jaribu": "2.2.3",
"jsdoc-babel": "^0.5.0",
"jsdoc-to-markdown": "^7.1.1",
"typescript": "^4.6.2"
"jsdoc-babel": "0.5.0",
"jsdoc-to-markdown": "7.1.1",
"typescript": "4.6.2"
},

@@ -52,0 +52,0 @@ "repository": {

@@ -24,3 +24,3 @@ /**

interface RedisConnectionPoolConfig {
export interface RedisConnectionPoolConfig {
max_clients?: number;

@@ -30,2 +30,9 @@ perform_checks?: boolean;

export default function redisConnectionPoolFactory(uid: string, cfg: RedisConnectionPoolConfig = {}, redisCfg: RedisClientOptions = {}) {
if (! connectionPools.has(uid)) {
connectionPools.set(uid, new RedisConnectionPool(uid, cfg, redisCfg));
}
return connectionPools.get(uid);
}
/**

@@ -50,6 +57,6 @@ * Function: redisConnectionPoolFactory

*
* cfg.max_clients - (number) - Max clients alive in the connection pool at
* cfg.max_clients - (number) - Max clients alive in the connection pool at
* once. (default: 30)
*
* cfg.perform_checks - (boolean) - Perform a series of redis checks,
* cfg.perform_checks - (boolean) - Perform a series of redis checks,
* currently this checks to to see if

@@ -65,10 +72,2 @@ * blocking push/pops can be used.

*/
export default function redisConnectionPoolFactory(uid: string, cfg: RedisConnectionPoolConfig = {}, redisCfg: RedisClientOptions = {}) {
if (! connectionPools.has(uid)) {
connectionPools.set(uid, new RedisConnectionPool(uid, cfg, redisCfg));
}
return connectionPools.get(uid);
}
export class RedisConnectionPool {

@@ -75,0 +74,0 @@ uid: string;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc