@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
'@backstage/plugin-events-backend': patch
|
||||
---
|
||||
|
||||
Adds an optional eventBroker for sending an event when there are conflicts, and exports InMemoryBroker for use in other plugins.
|
||||
@@ -31,6 +31,7 @@ import { EntityProvider as EntityProvider_2 } from '@backstage/plugin-catalog-no
|
||||
import { EntityProviderConnection as EntityProviderConnection_2 } from '@backstage/plugin-catalog-node';
|
||||
import { EntityProviderMutation as EntityProviderMutation_2 } from '@backstage/plugin-catalog-node';
|
||||
import { EntityRelationSpec as EntityRelationSpec_2 } from '@backstage/plugin-catalog-node';
|
||||
import { EventBroker } from '@backstage/plugin-events-node';
|
||||
import { GetEntitiesRequest } from '@backstage/catalog-client';
|
||||
import { JsonValue } from '@backstage/types';
|
||||
import { LocationSpec as LocationSpec_2 } from '@backstage/plugin-catalog-common';
|
||||
@@ -139,6 +140,8 @@ export class CatalogBuilder {
|
||||
replaceEntityPolicies(policies: EntityPolicy[]): CatalogBuilder;
|
||||
replaceProcessors(processors: CatalogProcessor_2[]): CatalogBuilder;
|
||||
setAllowedLocationTypes(allowedLocationTypes: string[]): CatalogBuilder;
|
||||
// (undocumented)
|
||||
setConflictEventBroker(broker: EventBroker): CatalogBuilder;
|
||||
setEntityDataParser(parser: CatalogProcessorParser_2): CatalogBuilder;
|
||||
setFieldFormatValidators(validators: Partial<Validators>): CatalogBuilder;
|
||||
setLocationAnalyzer(locationAnalyzer: LocationAnalyzer): CatalogBuilder;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
```ts
|
||||
import { Config } from '@backstage/config';
|
||||
import { EventBroker } from '@backstage/plugin-events-node';
|
||||
import { EventParams } from '@backstage/plugin-events-node';
|
||||
import { EventPublisher } from '@backstage/plugin-events-node';
|
||||
import { EventSubscriber } from '@backstage/plugin-events-node';
|
||||
import express from 'express';
|
||||
@@ -42,4 +43,15 @@ export class HttpPostIngressEventPublisher implements EventPublisher {
|
||||
// (undocumented)
|
||||
setEventBroker(eventBroker: EventBroker): Promise<void>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class InMemoryEventBroker implements EventBroker {
|
||||
constructor(logger: Logger);
|
||||
// (undocumented)
|
||||
publish(params: EventParams): Promise<void>;
|
||||
// (undocumented)
|
||||
subscribe(
|
||||
...subscribers: Array<EventSubscriber | Array<EventSubscriber>>
|
||||
): void;
|
||||
}
|
||||
```
|
||||
|
||||
@@ -25,6 +25,8 @@ import { Logger } from 'winston';
|
||||
* In-memory event broker which will pass the event to all registered subscribers
|
||||
* interested in it.
|
||||
* Events will not be persisted in any form.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
// TODO(pjungermann): add prom metrics? (see plugins/catalog-backend/src/util/metrics.ts, etc.)
|
||||
export class InMemoryEventBroker implements EventBroker {
|
||||
|
||||
@@ -5006,7 +5006,7 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@backstage/plugin-catalog-backend-module-github@workspace:^, @backstage/plugin-catalog-backend-module-github@workspace:plugins/catalog-backend-module-github":
|
||||
"@backstage/plugin-catalog-backend-module-github@workspace:plugins/catalog-backend-module-github":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@backstage/plugin-catalog-backend-module-github@workspace:plugins/catalog-backend-module-github"
|
||||
dependencies:
|
||||
@@ -22509,7 +22509,6 @@ __metadata:
|
||||
"@backstage/plugin-azure-sites-backend": "workspace:^"
|
||||
"@backstage/plugin-badges-backend": "workspace:^"
|
||||
"@backstage/plugin-catalog-backend": "workspace:^"
|
||||
"@backstage/plugin-catalog-backend-module-github": "workspace:^"
|
||||
"@backstage/plugin-catalog-node": "workspace:^"
|
||||
"@backstage/plugin-code-coverage-backend": "workspace:^"
|
||||
"@backstage/plugin-entity-feedback-backend": "workspace:^"
|
||||
|
||||
Reference in New Issue
Block a user