UNPKG

node-universe

Version:

基于 Nodejs 环境的一款微服务框架,原理来自于宇宙中的恒星,行星,卫星等系统。

20 lines (19 loc) 811 B
import { MetricReporterOptions } from '../../../typings/metric'; import MetricRegistry from '../registry'; import Star from '../../../lib/star'; import { LoggerInstance } from '../../../typings/logger'; import BaseMetric from '../type/base'; import { GenericObject } from '../../../typings'; export default class BaseReporter { options: MetricReporterOptions; registry: MetricRegistry | null; star: Star | null; logger: LoggerInstance | null; constructor(options: MetricReporterOptions); init(registry: MetricRegistry): void; stop(): Promise<void>; matchMetricName(name: string): boolean; formatMetricName(name: string): string; formatLabelName(name: string): string; metricChanged(metric: BaseMetric, value: any, labels?: GenericObject, timestamp?: number): void; }