This package has been deprecated

Author message:

This package has been replaced with @corva/node-sdk

@corva/node-scheduled-stream-lambda
TypeScript icon, indicating that this package has built-in type declarations

5.0.1 • Public • Published

node-scheduled-stream-lambda

Scheduled stream lambda class for constructing data apps that run on schedule and handle streams.

ToC

Requirements

  • node.js - >=12.0.0

Getting started

Installation

npm i @corva/node-scheduled-stream-lambda

Features

  • Defines scheduled stream workflow

Examples

const { ScheduledStreamLambda } = require('@corva/node-scheduled-stream-lambda');

// you may need api client and other libs
const { ApiClient } = require('@corva/node-api-client');
const apiClient = new ApiClient();

const lambda = new ScheduledStreamLambda({
  apiClient,
  process: async ({ event, context }) => {
    const result = event.a + event.b;
    return result;
  },
});

Scheduled stream event

Scheduled stream event could look like this:

const event = [
  [
    {
      type: 'data_app',
      collection: 'activity-groups',
      cron_string: '*/5 * * * *',
      environment: 'qa',
      app: 1,
      app_key: 'corva.activity-group',
      app_version: '0.0.1',
      app_connection: 12345,
      source_type: 'drilling',
      company: 1,
      provider: 'corva',
      api_url: 'https://some-url',
      api_key: 'activity-group-key',
      schedule: 116027101,
      interval: 300,
      schedule_start: 1575970800000,
      schedule_end: 1575971100000,
      asset_id: 1,
      asset_name: 'My Asset',
      asset_type: 'Well',
      timezone: 'America/Chicago',
    }, 
    {
      type: 'data_app',
      collection: 'activity-groups',
      cron_string: '*/5 * * * *',
      environment: 'qa',
      app: 1,
      app_key: 'corva.activity-group',
      app_version: '0.0.1',
      app_connection: 12345,
      source_type: 'drilling',
      company: 1,
      provider: 'corva',
      api_url: 'https://some-url',
      api_key: 'activity-group-key',
      schedule: 116027102,
      interval: 300,
      schedule_start: 1575971100000,
      schedule_end: 1575971400000,
      asset_id: 1,
      asset_name: 'My Asset',
      asset_type: 'Well',
      timezone: 'America/Chicago',
    }
  ]
];

Readme

Keywords

Package Sidebar

Install

npm i @corva/node-scheduled-stream-lambda

Weekly Downloads

0

Version

5.0.1

License

UNLICENSED

Unpacked Size

382 kB

Total Files

9

Last publish

Collaborators

  • aj8k
  • leonid.khomenko
  • suchov
  • vasyl.skalozub
  • andrii.koval
  • yuliiahryhorchuk
  • mgdskr_corva
  • ruslan.shukiurov
  • maksymozymok
  • kostia.khozhay
  • ryandawson
  • bestfit
  • oleksandr_krupko
  • villeti
  • jordanambra
  • dumavit1
  • antonpyrlyk
  • corva-devops-automation