Skip to content

Commit

Permalink
feat: remove useless client
Browse files Browse the repository at this point in the history
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
  • Loading branch information
SuZhou-Joe committed Dec 1, 2023
1 parent 01f8c99 commit 583ae1d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
10 changes: 1 addition & 9 deletions server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { AssistantConfig } from '.';
import {
CoreSetup,
CoreStart,
ILegacyClusterClient,
Logger,
Plugin,
PluginInitializerContext,
Expand All @@ -33,18 +32,11 @@ export class AssistantPlugin implements Plugin<AssistantPluginSetup, AssistantPl
.pipe(first())
.toPromise();
const router = core.http.createRouter();
const openSearchObservabilityClient: ILegacyClusterClient = core.opensearch.legacy.createClient(
'opensearch_observability',
{
plugins: [],
}
);

core.http.registerRouteHandlerContext('assistant_plugin', (context, request) => {
core.http.registerRouteHandlerContext('assistant_plugin', () => {
return {
config,
logger: this.logger,
observabilityClient: openSearchObservabilityClient,
};
});

Expand Down
1 change: 0 additions & 1 deletion server/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export interface RoutesOptions {
declare module '../../../src/core/server' {
interface RequestHandlerContext {
assistant_plugin: {
observabilityClient: ILegacyClusterClient;
logger: Logger;
};
}
Expand Down

0 comments on commit 583ae1d

Please sign in to comment.