Comparing version 5.6.3 to 5.7.0
CHANGELOG | ||
========= | ||
## 5.7.0 (2018-7-4) | ||
* @Willyham Add support for recording buffers in mock mode | ||
## 5.6.3 (2018-6-20) | ||
* singerb correct close() type definition | ||
* @singerb correct close() type definition | ||
@@ -7,0 +10,0 @@ ## 5.6.2 (2018-6-15) |
@@ -67,2 +67,7 @@ "use strict"; | ||
// If we're mocking the client, create a buffer to record the outgoing calls. | ||
if (this.mock) { | ||
this.mockBuffer = []; | ||
} | ||
// We only want a single flush event per parent and all its child clients | ||
@@ -251,2 +256,3 @@ if(!options.isChild && this.maxBufferSize > 0) { | ||
else { | ||
this.mockBuffer.push(message); | ||
if(typeof callback === 'function'){ | ||
@@ -253,0 +259,0 @@ callback(null, 0); |
{ | ||
"name": "hot-shots", | ||
"description": "Node.js client for StatsD, DogStatsD, and Telegraf", | ||
"version": "5.6.3", | ||
"version": "5.7.0", | ||
"author": "Steve Ivy", | ||
@@ -6,0 +6,0 @@ "types": "./types.d.ts", |
@@ -32,3 +32,3 @@ # hot-shots | ||
* `cacheDns`: Cache the initial dns lookup to *host* `default: false` | ||
* `mock`: Create a mock StatsD instance, sending no stats to the server? `default: false` | ||
* `mock`: Create a mock StatsD instance, sending no stats to the server and allowing data to be read from mockBuffer? `default: false` | ||
* `globalTags`: Tags that will be added to every metric. Can be either an object or list of tags. `default: {}` | ||
@@ -35,0 +35,0 @@ * `maxBufferSize`: If larger than 0, metrics will be buffered and only sent when the string length is greater than the size. `default: 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
51521
804