Merge pull request #21972 from fwfurtado/patch-1

Add missing imports on events-backend README
This commit is contained in:
Ben Lambert
2024-01-16 11:28:42 +01:00
committed by GitHub
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -42,6 +42,7 @@ Add the following to `makeCreateEnv`
```diff
// packages/backend/src/index.ts
+ import { DefaultEventBroker } from '@backstage/plugin-events-backend';
+ const eventBroker = new DefaultEventBroker(root.child({ type: 'plugin' }));
```
@@ -49,6 +50,7 @@ Then update plugin environment to include the event broker.
```diff
// packages/backend/src/types.ts
+ import { EventBroker } from '@backstage/plugin-events-node';
+ eventBroker: EventBroker;
```