This package has been deprecated

Author message:

No longer maintained

cher-source-interface

0.9.2 • Public • Published

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);
};
 

Readme

Keywords

none

Package Sidebar

Install

npm i cher-source-interface

Weekly Downloads

1

Version

0.9.2

License

MIT

Last publish

Collaborators

  • istrategylabs