/** * Pipeline Status Components * * Classifies pipeline status components (source collector, processor) and * resolves the component a metric collection belongs to. * * @packageDocumentation */ import type { PipelineComponentStatus } from './types'; /** * Component types RDI reports for a *source's* collector — one per source. * The name prefix alone is not enough to identify those: a status response also * carries shared collector infrastructure under a `collector-` name * (`collector-api`, of type `collector-api`), which is not a source. * * Taken from the generated SDK's {@link ComponentType} rather than spelled out * as strings, so a regenerated SDK cannot silently drift from this list. * * `ComponentType` is an *open* enum: RDI may report a type this build has never * heard of. The policy is deliberate — anything not listed here, known or not, * counts as non-source infrastructure. Treating an unknown type as a source * would invent phantom sources out of future infrastructure components (exactly * the `collector-api` failure), whereas ignoring it only means a new connector * kind is not tracked while being removed. `Components.test.ts` pins the * classification of every type the SDK declares, so adding one to the SDK fails * that test and forces this decision to be made explicitly. */ export declare const SOURCE_COLLECTOR_COMPONENT_TYPES: ReadonlySet; /** * Source name behind a pipeline status component. Prefer the backend's explicit * `source` because component names use the source alias and named pipelines * prefix the component name. Older responses without `source` fall back to the * default-pipeline `collector-` component name. * * A bare `collector` component yields `undefined`: it names no source, so * callers that correlate collectors with the names in `config.sources` must not * act on it. */ export declare function getComponentSourceName(component: PipelineComponentStatus | undefined): string | undefined; export declare function isProcessorComponent(component: PipelineComponentStatus | undefined): boolean; export declare function isFlinkProcessorComponent(component: PipelineComponentStatus | undefined): boolean; /** Looks up the status component named by a metric collection's `component`. */ export type MetricComponentResolver = (collectionComponent: string | undefined) => PipelineComponentStatus | undefined; /** * Resolves the pipeline status component a metric collection belongs to. A * collection's `component` is the `name` of a status component, which reports * the `type` and `source` its name alone does not reliably encode. * * A collection without a matching component resolves to `undefined`. */ export declare function createMetricComponentResolver(components: PipelineComponentStatus[] | undefined): MetricComponentResolver;