rx2
Report Events, Metrics, Issues, Actions to PM2 and PM2.io.
Last updated 5 years ago by tknew .
MIT · Original npm · Tarball · package.json
$ cnpm install rx2 
SYNC missed versions from official npm registry.

RX2

Report Events, Metrics, Issues, Actions to PM2 and PM2.io.

const rx2 = require('rx2')

// Event
rx2.event('eat', { food: 'poke' })

// Metric
rx2.metric({
  name: 'calories',
  val: () => {
    return 20
  }
})

rx2.metric('burnt calories', () => {
  return 30
})

let exC = rx2.metric('excess calories')
exC.set(40)

// return true
rx2.metricExists('burnt calories')

// Issue
rx2.issue(new Error('overweight')
rx2.issue('overweight')

// Action
rx2.action('lift weights', (cb) => {
  cb({ success: true })
})
$ pm2 start app.js
# Inspect primitive reported
$ pm2 show app

License

MIT

Current Tags

  • 1.0.3                                ...           latest (5 years ago)

3 Versions

  • 1.0.3                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (2)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |