@@ -11,6 +11,7 @@ import { FactCheckerFactory } from '@backstage/plugin-tech-insights-node';
|
||||
import { FactLifecycle } from '@backstage/plugin-tech-insights-node';
|
||||
import { FactRetriever } from '@backstage/plugin-tech-insights-node';
|
||||
import { FactRetrieverRegistration } from '@backstage/plugin-tech-insights-node';
|
||||
import { FactSchema } from '@backstage/plugin-tech-insights-node';
|
||||
import { Logger } from 'winston';
|
||||
import { PluginDatabaseManager } from '@backstage/backend-common';
|
||||
import { PluginEndpointDiscovery } from '@backstage/backend-common';
|
||||
@@ -51,6 +52,22 @@ export type FactRetrieverRegistrationOptions = {
|
||||
lifecycle?: FactLifecycle;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export interface FactRetrieverRegistry {
|
||||
// (undocumented)
|
||||
get(retrieverReference: string): FactRetrieverRegistration;
|
||||
// (undocumented)
|
||||
getSchemas(): FactSchema[];
|
||||
// (undocumented)
|
||||
listRegistrations(): FactRetrieverRegistration[];
|
||||
// (undocumented)
|
||||
listRetrievers(): FactRetriever[];
|
||||
// (undocumented)
|
||||
register(registration: FactRetrieverRegistration): void;
|
||||
// (undocumented)
|
||||
readonly retrievers: Map<string, FactRetrieverRegistration>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type PersistenceContext = {
|
||||
techInsightsStore: TechInsightsStore;
|
||||
@@ -91,7 +108,8 @@ export interface TechInsightsOptions<
|
||||
// (undocumented)
|
||||
discovery: PluginEndpointDiscovery;
|
||||
factCheckerFactory?: FactCheckerFactory<CheckType, CheckResultType>;
|
||||
factRetrievers: FactRetrieverRegistration[];
|
||||
factRetrieverRegistry?: FactRetrieverRegistry;
|
||||
factRetrievers?: FactRetrieverRegistration[];
|
||||
// (undocumented)
|
||||
logger: Logger;
|
||||
// (undocumented)
|
||||
|
||||
@@ -21,6 +21,10 @@ import {
|
||||
} from '@backstage/plugin-tech-insights-node';
|
||||
import { ConflictError, NotFoundError } from '@backstage/errors';
|
||||
|
||||
/**
|
||||
* @public
|
||||
*
|
||||
*/
|
||||
export interface FactRetrieverRegistry {
|
||||
readonly retrievers: Map<string, FactRetrieverRegistration>;
|
||||
register(registration: FactRetrieverRegistration): void;
|
||||
|
||||
Reference in New Issue
Block a user