How to use the runnerty.io function in runnerty

To help you get started, we’ve selected a few runnerty 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 runnerty / runnerty / lib / classes / runnertyio.js View on Github external
},
      method: 'POST',
      uri: '',
      json: true,
      auth: {
        bearer: ''
      },
      body: {}
    };
    _this.healthCheckerRecursiveTimeout = 1000 * 60 * 5; // 5 minutes
    _this.healthCheckerResponseTimeout = 1000 * 20; // 20 seconds
    _this.debug =
      global.config.general &&
      global.config.general.hasOwnProperty('runnerty.io') &&
      global.config.general['runnerty.io'].hasOwnProperty('debug') &&
      global.config.general['runnerty.io']['debug'] === true
        ? true
        : false;

    return new Promise(async resolve => {
      if (
        global.config.general &&
        global.config.general.hasOwnProperty('runnerty.io') &&
        global.config.general['runnerty.io'].hasOwnProperty('apikey') &&
        global.config.general['runnerty.io']['apikey'] !== '' &&
        !global.config.general['runnerty.io'].disable
      ) {
        await _this.checkAccess();
      }

      resolve(_this);
    });
github runnerty / runnerty / lib / classes / runnertyio.js View on Github external
constructor() {
    let _this = this;
    let protocol = 'https';
    if (
      global.config.general &&
      global.config.general.hasOwnProperty('runnerty.io') &&
      global.config.general['runnerty.io'].hasOwnProperty('protocol')
    ) {
      protocol = global.config.general['runnerty.io']['protocol'];
    }
    _this.haveAccess = false;
    _this.endpoints = {
      chain: protocol + '://telemetry.runnerty.io/api/chainlog',
      process: protocol + '://telemetry.runnerty.io/api/processlog',
      access: protocol + '://telemetry.runnerty.io/api/checkaccess',
      health: protocol + '://telemetry.runnerty.io/api/health',
      dead: protocol + '://telemetry.runnerty.io/api/dead'
    };
    _this._values = {
      headers: {
        'User-Agent': 'runnerty',
        'Content-Type': 'application/json'
      },
github runnerty / runnerty / lib / classes / runnertyio.js View on Github external
return new Promise(resolve => {
      let valuesSend = this._values;
      valuesSend.auth.bearer = global.config.general['runnerty.io']['apikey'];
      valuesSend.uri = this.endpoints.access;
      valuesSend.body.version = global.version;

      http(valuesSend)
        .then(_ => {
          logger.log('info', 'Successful access to runnerty.io');
          this.haveAccess = true;
          if (
            global.config.general.hasOwnProperty('runnerty.io') &&
            global.config.general['runnerty.io'].hasOwnProperty(
              'healthChecker'
            ) &&
            global.config.general['runnerty.io']['healthChecker'] === true
          ) {
            this.healthCheckerRecursive();
          }
github runnerty / runnerty / lib / classes / runnertyio.js View on Github external
.then(_ => {
          logger.log('info', 'Successful access to runnerty.io');
          this.haveAccess = true;
          if (
            global.config.general.hasOwnProperty('runnerty.io') &&
            global.config.general['runnerty.io'].hasOwnProperty(
              'healthChecker'
            ) &&
            global.config.general['runnerty.io']['healthChecker'] === true
          ) {
            this.healthCheckerRecursive();
          }
          resolve();
        })
        .catch(err => {
github runnerty / runnerty / lib / classes / runnertyio.js View on Github external
return new Promise(async resolve => {
      if (
        global.config.general &&
        global.config.general.hasOwnProperty('runnerty.io') &&
        global.config.general['runnerty.io'].hasOwnProperty('apikey') &&
        global.config.general['runnerty.io']['apikey'] !== '' &&
        !global.config.general['runnerty.io'].disable
      ) {
        await _this.checkAccess();
      }

      resolve(_this);
    });
  }
github runnerty / runnerty / lib / classes / runnertyio.js View on Github external
constructor() {
    let _this = this;
    let protocol = 'https';
    if (
      global.config.general &&
      global.config.general.hasOwnProperty('runnerty.io') &&
      global.config.general['runnerty.io'].hasOwnProperty('protocol')
    ) {
      protocol = global.config.general['runnerty.io']['protocol'];
    }
    _this.haveAccess = false;
    _this.endpoints = {
      chain: protocol + '://telemetry.runnerty.io/api/chainlog',
      process: protocol + '://telemetry.runnerty.io/api/processlog',
      access: protocol + '://telemetry.runnerty.io/api/checkaccess',
      health: protocol + '://telemetry.runnerty.io/api/health',
      dead: protocol + '://telemetry.runnerty.io/api/dead'
    };
    _this._values = {
      headers: {
        'User-Agent': 'runnerty',
        'Content-Type': 'application/json'
      },
      method: 'POST',
      uri: '',

runnerty

Process orchestrator

MIT
Latest version published 11 months ago

Package Health Score

56 / 100
Full package analysis

Popular runnerty functions