good-tcp

1.1.0 • Public • Published

good-tcp

TCP broadcasting for the Good process monitor with optional TLS support.

Build Status Current Version

Development on good-tcp is sponsored by Sparo Labs.

Install

$ npm install --save good-tcp

Usage

new GoodTcp(endpoint, [config])

Creates a new GoodTcp object where:

  • endpoint - A full path to a remote server to transmit logs.
  • config - Configuration object:
    • threshold - The number of events to hold before transmission. Defaults to 20. Set to 0 to have every event start transmission immediately. It is recommended to set threshold as high as possible to make data transmission more efficient and reduce the number of TCP connections that must be initiated.
    • maxDelay - Maximum milliseconds to allow buffer to wait before forcing a stream write on next message. Defaults to 0, turning off this feature. If you have a server that generates logs infrequently, turn on this feature to see logs arriving in batches, but more regularly.
    • tls - Whether to transmit via TLS. Defaults to false.
    • tlsOptions - Options to configure the TLS connection. Please see the Node.js documentation for TLS for the available options and their defaults.

When stream emits an "end" event, GoodTcp will transmit any events remaining in it's internal buffer to attempt to prevent data loss.

Version Compatibility

This plugin extends Stream.Writable and is compatible with Good version 7.0 and higher.

Note: This plugin does not implement the interface expected by earlier versions of Good.

License

This project is licensed under the MIT license. See the LICENSE file for more info.

Package Sidebar

Install

npm i good-tcp

Weekly Downloads

2

Version

1.1.0

License

MIT

Last publish

Collaborators

  • pizzabrandon