Comparing version 0.5.1 to 1.0.0
{ | ||
"name": "riemann", | ||
"version": "0.5.1", | ||
"version": "1.0.0", | ||
"description": "node.js client for Riemann, supports hybrid UDP/TCP connections.", | ||
@@ -9,2 +9,5 @@ "author": { | ||
}, | ||
"contributors": [ | ||
"Lovell Fuller <npm@lovell.info>" | ||
], | ||
"main": "riemann", | ||
@@ -19,3 +22,3 @@ "engines": { | ||
"dependencies": { | ||
"protobuf": "^0.11.0" | ||
"node-protobuf": "^1.2.9" | ||
}, | ||
@@ -22,0 +25,0 @@ "devDependencies": { |
@@ -5,8 +5,32 @@ # [Riemann](http://aphyr.github.com/riemann/) Node.js Client | ||
## Prerequisites | ||
## Installation | ||
Riemann uses [Google Protocol Buffers](https://github.com/google/protobuf), | ||
so please make sure it's installed beforehand. | ||
Riemann uses [Google Protocol Buffers](http://code.google.com/p/protobuf/), so make sure thats installed beforehand, and available on your `PATH`. | ||
### Ubuntu/Debian via apt | ||
```sh | ||
apt-get install libprotobuf-dev | ||
``` | ||
### RHEL/Centos via yum | ||
```sh | ||
yum install protobuf-devel | ||
``` | ||
### Mac OS via homebrew | ||
```sh | ||
brew install protobuf | ||
``` | ||
### Windows | ||
https://github.com/fuwaneko/node-protobuf#windows | ||
## Installation | ||
```sh | ||
npm install riemann | ||
@@ -20,8 +44,8 @@ ``` | ||
```js | ||
var client = require('riemann').createClient({ | ||
host: 'some.riemann.server', | ||
port: 5555 | ||
var client = require('riemann').createClient({ | ||
host: 'some.riemann.server', | ||
port: 5555 | ||
}); | ||
client.on('connect', function() { | ||
client.on('connect', function() { | ||
console.log('connected!'); | ||
@@ -46,3 +70,3 @@ }); | ||
```js | ||
client.on('data', function(ack) { | ||
client.on('data', function(ack) { | ||
console.log('got it!'); | ||
@@ -73,3 +97,3 @@ }); | ||
```js | ||
client.on('disconnect', function(){ | ||
client.on('disconnect', function(){ | ||
console.log('disconnected!'); | ||
@@ -76,0 +100,0 @@ }); |
@@ -5,3 +5,3 @@ /* initialize our protobuf schema, | ||
if (!riemannSchema) { | ||
var Schema = require('protobuf').Schema; | ||
var Schema = require('node-protobuf'); | ||
var readFile = require('fs').readFileSync; | ||
@@ -12,7 +12,7 @@ riemannSchema = new Schema(readFile(__dirname+'/proto/proto.desc')); | ||
function _serialize(type, value) { | ||
return riemannSchema[type].serialize(value); | ||
return riemannSchema.serialize(value, type); | ||
} | ||
function _deserialize(type, value) { | ||
return riemannSchema[type].parse(value); | ||
return riemannSchema.parse(value, type); | ||
} | ||
@@ -19,0 +19,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
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
15250
12
1
1
108
+ Addednode-protobuf@^1.2.9
+ Addedbindings@1.5.0(transitive)
+ Addedfile-uri-to-path@1.0.0(transitive)
+ Addednan@2.22.0(transitive)
+ Addednode-protobuf@1.4.3(transitive)
- Removedprotobuf@^0.11.0
- Removednan@1.0.0(transitive)
- Removedprotobuf@0.11.1(transitive)