forked from opensearch-project/dashboards-flow-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin.ts
48 lines (39 loc) · 1.02 KB
/
plugin.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
import {
PluginInitializerContext,
CoreSetup,
CoreStart,
Plugin,
Logger,
} from '../../../src/core/server';
import {
FlowFrameworkDashboardsPluginSetup,
FlowFrameworkDashboardsPluginStart,
} from './types';
import { registerOpenSearchRoutes } from './routes';
export class FlowFrameworkDashboardsPlugin
implements
Plugin<
FlowFrameworkDashboardsPluginSetup,
FlowFrameworkDashboardsPluginStart
> {
private readonly logger: Logger;
constructor(initializerContext: PluginInitializerContext) {
this.logger = initializerContext.logger.get();
}
public setup(core: CoreSetup) {
this.logger.debug('flow-framework-dashboards: Setup');
const router = core.http.createRouter();
// Register server side APIs
registerOpenSearchRoutes(router);
return {};
}
public start(core: CoreStart) {
this.logger.debug('flow-framework-dashboards: Started');
return {};
}
public stop() {}
}