UNPKG

@grafana/alerting

Version:

Grafana Alerting Library – Build vertical integrations on top of the industry-leading alerting solution

23 lines (22 loc) 735 B
import { type Label, type LabelMatcher } from './types'; type LabelMatchingResult = { matches: boolean; details: LabelMatchDetails[]; }; export type LabelMatchDetails = { labelIndex: number; match: boolean; matcher: LabelMatcher | null; } & (PositiveLabelMatch | NegativeLabelMatch); type PositiveLabelMatch = { match: true; matcher: LabelMatcher; }; type NegativeLabelMatch = { match: false; matcher: null; }; export declare function matchLabels(matchers: LabelMatcher[], labels: Label[]): LabelMatchingResult; export declare function isLabelMatch(matcher: LabelMatcher, label: Label): boolean; export declare function matchLabelsSet(matchers: LabelMatcher[], labels: Label[]): boolean; export {};