Merge pull request #5587 from backstage/mob/wire-locationservice

catalog/next: Wire API with locationStore, fix filtering
This commit is contained in:
Johan Haals
2021-05-06 13:30:28 +02:00
committed by GitHub
7 changed files with 290 additions and 30 deletions
+4 -3
View File
@@ -20,6 +20,7 @@ import {
createRouter,
NextCatalogBuilder,
runPeriodically,
createNextRouter,
} from '@backstage/plugin-catalog-backend';
import { Router } from 'express';
import { PluginEnvironment } from '../types';
@@ -36,18 +37,18 @@ export default async function createPlugin(
const builder = new NextCatalogBuilder(env);
const {
entitiesCatalog,
locationsCatalog,
locationAnalyzer,
processingEngine,
locationService,
} = await builder.build();
// TODO(jhaals): run and manage in background.
await processingEngine.start();
return await createRouter({
return await createNextRouter({
entitiesCatalog,
locationsCatalog,
locationAnalyzer,
locationService,
logger: env.logger,
config: env.config,
});