mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
e55378e1c4
Impelements: - http://unleash.host.com/api/client/seen-toggles - http://unleash.host.com/api/metrics/feature-toggles - http://localhost:4242/api/client/applications - http://localhost:4242/api/client/applications/:appName
27 lines
1003 B
JavaScript
27 lines
1003 B
JavaScript
'use strict';
|
|
|
|
const { createDb } = require('./db-pool');
|
|
const EventStore = require('./event-store');
|
|
const FeatureToggleStore = require('./feature-toggle-store');
|
|
const StrategyStore = require('./strategy-store');
|
|
const ClientInstanceStore = require('./client-instance-store');
|
|
const ClientMetricsDb = require('./client-metrics-db');
|
|
const ClientMetricsStore = require('./client-metrics-store');
|
|
const ClientStrategyStore = require('./client-strategy-store');
|
|
|
|
module.exports.createStores = (config) => {
|
|
const db = createDb(config);
|
|
const eventStore = new EventStore(db);
|
|
const clientMetricsDb = new ClientMetricsDb(db);
|
|
|
|
return {
|
|
db,
|
|
eventStore,
|
|
featureToggleStore: new FeatureToggleStore(db, eventStore),
|
|
strategyStore: new StrategyStore(db, eventStore),
|
|
clientInstanceStore: new ClientInstanceStore(db),
|
|
clientMetricsStore: new ClientMetricsStore(clientMetricsDb),
|
|
clientStrategyStore: new ClientStrategyStore(db),
|
|
};
|
|
};
|