feat: add a new system metadata service
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
This commit is contained in:
@@ -23,3 +23,16 @@ export type {
|
||||
export type { ActionsService, ActionsServiceAction } from './ActionsService';
|
||||
|
||||
export { actionsRegistryServiceRef, actionsServiceRef } from './refs';
|
||||
|
||||
import { createServiceRef } from '@backstage/backend-plugin-api';
|
||||
|
||||
export const systemMetadataServiceRef = createServiceRef<
|
||||
import('./services/definitions/SystemMetadataService').SystemMetadataService
|
||||
>({
|
||||
id: 'core.systemMetadata',
|
||||
});
|
||||
|
||||
export type {
|
||||
BackstageInstance,
|
||||
SystemMetadataService,
|
||||
} from './services/definitions/SystemMetadataService';
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright 2024 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
type Target = string | { internal: string; external: string };
|
||||
|
||||
export interface BackstageInstance {
|
||||
url: Target;
|
||||
}
|
||||
|
||||
export interface SystemMetadataService {
|
||||
listInstances(): Promise<BackstageInstance[]>;
|
||||
}
|
||||
Reference in New Issue
Block a user