How to use radar_client - 2 common examples

To help you get started, we’ve selected a few radar_client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zendesk / radar / test / common.js View on Github external
var configuration = require('../configurator').load({ persistence: true })
var Sentry = require('../src/core/resources/presence/sentry')
var Client = require('radar_client').constructor
var fork = require('child_process').fork
var Tracker = require('callback_tracker')

Sentry.expiry = 4000
if (process.env.verbose) {
  var Minilog = require('minilog')
  // Configure log output
  Minilog.pipe(Minilog.suggest.deny(/.*/, (process.env.radar_log ? process.env.radar_log : 'debug')))
    .pipe(formatter)
    .pipe(Minilog.backends.nodeConsole.formatColor)
    .pipe(process.stdout)

  require('radar_client')._log.pipe(Minilog.suggest.deny(/.*/, (process.env.radar_log ? process.env.radar_log : 'debug')))
    .pipe(formatter)
    .pipe(Minilog.backends.nodeConsole.formatColor)
    .pipe(process.stdout)
}

http.globalAgent.maxSockets = 10000

module.exports = {
  spawnRadar: function () {
    var radarProcess

    function getListener (action, callbackFn) {
      var listener = function (message) {
        message = JSON.parse(message)
        logging.debug('message received', message, action)
        if (message.action === action) {
github zendesk / radar / test / common.js View on Github external
getClient: function (account, userId, userType, userData, done) {
    var client = new Client().configure({
      userId: userId,
      userType: userType,
      accountName: account,
      port: configuration.port,
      upgrade: false,
      userData: userData
    }).once('ready', done).alloc('test')
    return client
  },
  configuration: configuration,

radar_client

Realtime apps with a high level API based on engine.io

Apache-2.0
Latest version published 6 months ago

Package Health Score

66 / 100
Full package analysis

Popular radar_client functions