Socket
Socket
Sign inDemoInstall

cher-source-interface

Package Overview
Dependencies
179
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cher-source-interface

Interface for Cher source streams


Version published
Weekly downloads
7
Maintainers
1
Install size
26.6 MB
Created
Weekly downloads
 

Readme

Source

Cher Source Stream Interface

This is an adapter for any source of data to be interoperable with the cher stream manager. A cher source stream must utilize this adapter as well as implement a set of functions which will allow it to emit data properly.

module.exports = (deps) => {
  // deps is any set of dependencies you need to pass off to the implementation
  deps = deps || {};
  // dataSchema is a joi object which defines how the data should look when
  // it arrives from the source. Read more about joi at the link below
  // https://github.com/hapijs/joi
  const dataSchema  = require('./schema')();
  const implementation = require('./implementation');
  const adapter = require('cher-source-interface').adapter;

  const options = {
    schema: dataSchema,
    // deprecated in favor of name`
    type: 'myDataSource',
    name: 'myDataSource',
    impl: implementation
  };
  return adapter(deps, options);
};

FAQs

Last updated on 07 Jan 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc