@knative-extensions/plugin-knative-event-mesh-backend 0.0.0-snapshot.2148f52 → 0.0.0-snapshot.fd70ea3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,13 +46,15 @@ catalog:
|
|
|
46
46
|
timeout: { minutes: 1 }
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
Configure the scheduler for the entity provider. Add the following code
|
|
50
|
-
file:
|
|
51
|
-
|
|
52
|
-
In file `packages/backend/src/plugins/catalog.ts`:
|
|
49
|
+
Configure the scheduler for the entity provider and enable the processor. Add the following code
|
|
50
|
+
to `packages/backend/src/plugins/catalog.ts` file:
|
|
53
51
|
|
|
54
52
|
```ts
|
|
55
|
-
import {
|
|
53
|
+
import {CatalogClient} from "@backstage/catalog-client";
|
|
54
|
+
import {
|
|
55
|
+
KnativeEventMeshProcessor,
|
|
56
|
+
KnativeEventMeshProvider
|
|
57
|
+
} from '@knative-extensions/plugin-knative-event-mesh-backend';
|
|
56
58
|
|
|
57
59
|
export default async function createPlugin(
|
|
58
60
|
env:PluginEnvironment,
|
|
@@ -61,13 +63,18 @@ export default async function createPlugin(
|
|
|
61
63
|
|
|
62
64
|
/* ... other processors and/or providers ... */
|
|
63
65
|
|
|
64
|
-
// ADD
|
|
66
|
+
// ADD THESE
|
|
65
67
|
builder.addEntityProvider(
|
|
66
68
|
KnativeEventMeshProvider.fromConfig(env.config, {
|
|
67
69
|
logger: env.logger,
|
|
68
70
|
scheduler: env.scheduler,
|
|
69
71
|
}),
|
|
70
72
|
);
|
|
73
|
+
const catalogApi = new CatalogClient({
|
|
74
|
+
discoveryApi: env.discovery,
|
|
75
|
+
});
|
|
76
|
+
const knativeEventMeshProcessor = new KnativeEventMeshProcessor(catalogApi, env.logger);
|
|
77
|
+
builder.addProcessor(knativeEventMeshProcessor);
|
|
71
78
|
|
|
72
79
|
/* ... other processors and/or providers ... */
|
|
73
80
|
|