reshuffle-base-connector

This package contains utilities for implementing new Reshuffle connectors

Usage no npm install needed!

<script type="module">
  import reshuffleBaseConnector from 'https://cdn.skypack.dev/reshuffle-base-connector';
</script>

README

reshuffle-base-connector

Base class for Reshuffle Connectors

Get started

To implement a new connector, create a new class extending the BaseConnector class from this package.

Example:

import { BaseConnector } from 'reshuffle-base-connector'

class MyCustomConnector extends BaseConnector<MyConnectorConfigOptions, MyConnectorEventOptions> {
    
  constructor(options, id /* your custom options */) {
    super(id)
    // Set your custom options here
  }
    
  onStart() {
    // ...
  }
    
  onStop() {
    // ...
  }
 
  on(options: EventOptionsType, eventId: EventConfiguration['id']): EventConfiguration {
    // ...
  }

}