import { DataSourceApi, type DataSourceRef, type ScopedVars } from '@grafana/data'; import { type RuntimeDataSourceRegistration } from '../dataSourceSrv'; import { type ImportDataSourcePluginFn } from './types'; /** * Register the data source plugin importer. Called once from application boot. * The runtime package cannot depend on `public/app/features/plugins`, so the * concrete import function is injected here at startup. * * @internal */ export declare function setDataSourcePluginImporter(fn: ImportDataSourcePluginFn): void; /** * Load and return a data source plugin instance. Resolves the data source by * name, uid, or {@link DataSourceRef}, caches the constructed instance, and * reuses it on subsequent calls. Concurrent callers for the same uid share * a single in-flight load. * * @public */ export declare function getDataSourceInstance(ref?: DataSourceRef | string | null, scopedVars?: ScopedVars): Promise; /** * Register a runtime data source. Writes to both the instance-settings cache * and the plugin-instance cache so the data source is available to * {@link getDataSourceInstanceSettings} and {@link getDataSourceInstance}. * * Runtime data sources are intentionally excluded from {@link getDataSourceInstanceSettingsList} * results, matching the behaviour of the legacy `DatasourceSrv.registerRuntimeDataSourceInstance`. * * @public */ export declare function registerRuntimeDataSourceInstance(entry: RuntimeDataSourceRegistration): void; /** * Test helper — resets module-local state. Should only be called from tests. * * @internal */ export declare function _resetForTests(): void;