UNPKG

diffusion

Version:

Diffusion JavaScript client

48 lines (47 loc) 2.3 kB
"use strict"; /** * @module Services.MetricCollectors */ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.TopicMetricCollectorImpl = void 0; var require_non_null_1 = require("./../../util/require-non-null"); var abstract_metric_collector_1 = require("./abstract-metric-collector"); /** * A topic metric collector. */ var TopicMetricCollectorImpl = /** @class */ (function (_super) { __extends(TopicMetricCollectorImpl, _super); /** * Create a new TopicMetricCollector instance * * @param name identity * @param exportToPrometheus whether to expose the collector through the Prometheus gateway * @param topicSelector identifies the target topics * @param groupByTopicType whether to group the results by topic type */ function TopicMetricCollectorImpl(name, exportToPrometheus, maximumGroups, topicSelector, groupByTopicType, groupByTopicView, groupByPathPrefixParts) { var _this = _super.call(this, name, exportToPrometheus, maximumGroups) || this; _this.topicSelector = topicSelector; _this.groupByTopicType = groupByTopicType; _this.groupByTopicView = groupByTopicView; _this.groupByPathPrefixParts = require_non_null_1.requireNonNegative(groupByPathPrefixParts, 'groupByPathPrefixParts'); return _this; } return TopicMetricCollectorImpl; }(abstract_metric_collector_1.AbstractMetricCollector)); exports.TopicMetricCollectorImpl = TopicMetricCollectorImpl;