redis-streams-broker
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -6,2 +6,3 @@ export declare class StreamChannelBroker { | ||
joinConsumerGroup(groupName: string, readFrom: string): Promise<ConsumerGroup>; | ||
memoryFootprint():Promise<integer>; | ||
} | ||
@@ -8,0 +9,0 @@ |
@@ -15,2 +15,3 @@ const redisType = require("ioredis"); | ||
this.joinConsumerGroup = this._destroyingCheckWrapper(this.joinConsumerGroup.bind(this)); | ||
this.memoryFootprint = this._destroyingCheckWrapper(this.memoryFootprint.bind(this)); | ||
this.destroy = this._destroyingCheckWrapper(this.destroy.bind(this)); | ||
@@ -151,2 +152,6 @@ this._transformResponseToMessage = this._transformResponseToMessage.bind(this); | ||
async memoryFootprint() { | ||
return await this._redisClient.memory("usage", this._channelName,"samples",0); | ||
} | ||
async destroy() { | ||
@@ -153,0 +158,0 @@ this._destroying = true; |
{ | ||
"name": "redis-streams-broker", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "This package is a broker to redis stream data type, This package provides guaranteed message delivery feature with acknowledgement.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
const assert = require('assert'); | ||
const utils = require('./test-utils'); | ||
const localRedisConnectionString = "redis://127.0.0.1:6379/"; | ||
const targetType = require('../index'); | ||
const targetType = require('../index').StreamChannelBroker; | ||
const channelName = "Channel1"; | ||
@@ -64,2 +64,6 @@ const maxtimeout = 3000; | ||
//Check Memory Usage | ||
let memoryFinal = await target.memoryFootprint(); | ||
assert.deepEqual(memoryFinal > 0, true, "Memory cannot be zero"); | ||
}).timeout(maxtimeout * 2); | ||
@@ -66,0 +70,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22387
382