fh-messaging-client

1.0.5 • Public • Published

fh-messaging-client

client for interfacing with fh-messaging both in the core and the mbaas

usage:

 
var fhMessaging = require('fh-messaging-client')(metricsConfig)
 
 
fhMessaging.createAppMessage(topic,message,cb)
 
//topic is normally fhact
 
//message is an object generated by the reporting client normally: 
 
{
      guid:string (instance app id),
      appid:string (widget project id),
      domain:string,
      bytes:fullparams.bytes, //number
      cached:false,
      cuid:_fh.cuid || "",
      destination:_fh.destination || "",
      agent: fullparams.agent,
      'function':fullparams.funct || "",
      ipAddress:ip,
      scriptEngine:"node",
      'status':fullparams.status || "",
      time:fullparams.time || 0,
      startTime : fullparams.start,
      endTime : fullparams.end,
      'version':_fh.version || 0}
 
 
 
/*
     * 
     * @param from Number timestamp
     * @param to Number timestamp
     * @param level string (domain/app)
     * @param data Object (rolled up metrics)
     * @param cb function
     * @desc from and to are the time range the metrics being sent covers. The level is either domain or app and the data is rolled up metrics being sent
*/
 
fhMessaging.sendMbaasMetrics(from, to , level, data, cb);

Readme

Keywords

none

Package Sidebar

Install

npm i fh-messaging-client

Weekly Downloads

7

Version

1.0.5

License

Apache-2.0

Unpacked Size

345 kB

Total Files

14

Last publish

Collaborators

  • feedhenry
  • feedhenry-dev
  • grdryn
  • luigizuccarelli
  • maleck13