How to use the @ddes/core.StorePoller function in @ddes/core

To help you get started, we’ve selected a few @ddes/core 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 Skalar / ddes / packages / @ddes / event-streaming / lib / EventStreamer.ts View on Github external
}
  ) {
    const {
      authenticateClient: verifyClient,
      port = 80,
      chronologicalGroups = ['default'],
      ...storePollerParams
    } = params

    this.wss = new WebSocketServer({verifyClient, port})
    this.wss.on('connection', this.onClientConnected.bind(this))
    this.chronologicalGroups = chronologicalGroups

    for (const chronologicalGroup of chronologicalGroups) {
      this.storePollers.push(
        new StorePoller({
          ...storePollerParams,
          processCommit: this.processCommit.bind(this),
        })
      )
    }

    this.debug = debug('DDES.EventStreamer.Server')
  }

@ddes/core

Event Sourcing in TypeScript

MIT
Latest version published 3 months ago

Package Health Score

65 / 100
Full package analysis