mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-06 00:07:44 +01:00
22 lines
773 B
JavaScript
22 lines
773 B
JavaScript
'use strict';
|
|
|
|
const EventStore = require('./event-store');
|
|
const FeatureToggleStore = require('./feature-toggle-store');
|
|
const StrategyStore = require('./strategy-store');
|
|
const clientInstancesDbCreator = require('./client-instances');
|
|
const clientMetricsDbCreator = require('./client-metrics');
|
|
const clientStrategiesDbCreator = require('./client-strategies');
|
|
|
|
module.exports = (db) => {
|
|
const eventStore = new EventStore(db);
|
|
|
|
return {
|
|
eventStore,
|
|
featureToggleStore: new FeatureToggleStore(db, eventStore),
|
|
strategyStore: new StrategyStore(db, eventStore),
|
|
clientInstancesDb: clientInstancesDbCreator(db),
|
|
clientMetricsDb: clientMetricsDbCreator(db),
|
|
clientStrategiesDb: clientStrategiesDbCreator(db),
|
|
};
|
|
};
|