mozilla-services/heka-node — pull request #14 by crankycoder (2013-09-17 13:43:41+00:00)
Title: Features/new protobufjs

This is a big update. This client requires heka 0.4 which drops the header for the encoding format.

The big change here is that we're 100% protocol buffers now and there's been a lot of testing and documentation updates.

cc @dannycoates, @shane-tomlinson

Code updates:

* fixed a typo in the typeSeverityMaxProvider filter and updated testcase
* added dependency to long.js to get proper 64-bit nanosecond timestamps
* changed timestamps to use literal int64 values instead of taking in a JS Date object
* updated API to switch from 'senders' to streams+encoders like in heka-py
* dropping JSONENcoder and using ProtobufEncoding instead
* UUIDs were not serializing on the wire properly, fixed
* updated to use new protobufjs 1.1.6.
* added tests for all field types with verification against byte dumps
from protobuf-python
* updated message.proto to new message encoding free header and
recompile the protobuf descriptor file

Test changes:

* exported the hex_to_bin function from uuid and added tests around it
* cleaned up the disabledTimer tests to be clearer and corrected the wildcard timer test
* updated filters.spec.js to use proper Message objects
* added --captureExceptions to jasmine so that "npm test" properly returns non-zero exit codes
* lots of wire level encoding tests added
* added tests around the FileStream
* updated timestamp verification to use Long.js as we need to support
int64 values as hekad expects nanosecond timestamps
* dropped the use of a mockSender and use the debugStreamFactory instead
* dropped encoders.spec.js testsuite as we have an explicit suite
around protobuf encoding

Documentation updates

* filled out the documentation for plugin configuration
* lots of examples added