Merge pull request #7171 from backstage/mob/refresh-catalog

Catalog: Add API endpoint for refreshing entities
This commit is contained in:
Fredrik Adelöw
2021-09-16 14:24:55 +02:00
committed by GitHub
16 changed files with 627 additions and 78 deletions
@@ -1,7 +1,4 @@
import {
CatalogBuilder,
createRouter,
} from '@backstage/plugin-catalog-backend';
import { CatalogBuilder } from '@backstage/plugin-catalog-backend';
import { Router } from 'express';
import { PluginEnvironment } from '../types';
@@ -9,22 +6,7 @@ export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
const builder = await CatalogBuilder.create(env);
const {
entitiesCatalog,
locationsCatalog,
locationService,
processingEngine,
locationAnalyzer,
} = await builder.build();
const { processingEngine, router } = await builder.build();
await processingEngine.start();
return await createRouter({
entitiesCatalog,
locationsCatalog,
locationService,
locationAnalyzer,
logger: env.logger,
config: env.config,
});
return router;
}