1.0.5 • Published 6 years ago

fh-messaging-client v1.0.5

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
6 years ago

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);
1.0.5

6 years ago

1.0.4

7 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

9 years ago