Skip to content
/ good-http Public

Http(s) broadcasting for Good process monitor

License

Notifications You must be signed in to change notification settings

arb/good-http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

good-http

Http(s) broadcasting for Good process monitor

Build Status Current Version

Lead Maintainer: Adam Bretz

Usage

good-http is a good-reporter implementation to write hapi server events to remote endpoints. It makes a "POST" request with a JSON payload to the supplied endpoint.

Good Http

new GoodHttp (endpoint, [options])

creates a new GoodFile object with the following arguments

  • endpoint - full path to remote server to transmit logs.
  • [options] - optional arguments object
    • [events] - an object of key value paris. Defaults to { request: '*', log: '*' }.
      • key - one of ("request", "log", "error", or "ops") indicating the hapi event to subscribe to
      • value - an array of tags to filter incoming events. An empty array indicates no filtering.
    • threshold - number of events to hold before transmission. Defaults to 20. Set to 0 to have every event start transmission instantly. It is strongly suggested to have a set threshold to make data transmission more efficient.
    • [wreck] - configuration object to pass into wreck. Defaults to { timeout: 60000, headers: {} }. content-type is always "application/json".

GoodHttp Methods

good-file implements the good-reporter interface as has no additional public methods.

  • stop(callback) - GoodHttp will make a final attempt to transmit anything remaining in it's internal event queue when stop is called.

About

Http(s) broadcasting for Good process monitor

Resources

License

Stars

Watchers

Forks

Packages

No packages published