How to use coinstac-pipeline - 2 common examples

To help you get started, we’ve selected a few coinstac-pipeline 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 trendscenter / coinstac / packages / coinstac-server / src / routes / pipeline.js View on Github external
// const helperFunctions = require('../auth-helpers');
const PipelineManager = require('coinstac-pipeline');
const path = require('path');
const axios = require('axios');
const config = require('../config');
const graphqlSchema = require('coinstac-graphql-schema');
const { pullImagesFromList, pruneImages } = require('coinstac-docker-manager');
const dbmap = require('/etc/coinstac/cstacDBMap'); // eslint-disable-line import/no-absolute-path, import/no-unresolved

const manager = PipelineManager.create({
  mode: 'remote',
  clientId: 'remote',
  operatingDirectory: path.resolve(config.operatingDirectory, 'coinstac'),
  mqttRemotePort: config.mqttServer.port,
  mqttRemoteProtocol: config.mqttServer.protocol,
  mqttRemoteURL: config.mqttServer.hostname,
});

const authenticateServer = () => {
  return axios.post(
    `${config.apiServer}/authenticate`,
    dbmap.rethinkdbServer
  )
    .then((token) => {
      this.id_token = token.data.id_token;
      axios.defaults.headers.common.Authorization = `Bearer ${this.id_token}`;
github trendscenter / coinstac / packages / coinstac-client-core / src / index.js View on Github external
initialize() {
    return PipelineManager.create({
      mode: 'local',
      clientId: this.options.userId,
      logger: this.logger,
      operatingDirectory: path.join(this.appDirectory),
      remotePort: this.options.fileServer.port,
      remoteProtocol: this.options.fileServer.protocol,
      remotePathname: this.options.fileServer.pathname,
      remoteURL: this.options.fileServer.hostname,
      mqttRemotePort: this.options.mqttServer.port,
      mqttRemoteProtocol: this.options.mqttServer.protocol,
      mqttRemoteURL: this.options.mqttServer.hostname,
    }).then((manager) => {
      this.pipelineManager = manager;
      return manager;
    });
  }

coinstac-pipeline

Computation registry service for COINSTAC.

MIT
Latest version published 2 months ago

Package Health Score

69 / 100
Full package analysis

Popular coinstac-pipeline functions