@libp2p/interface 2.0.1-c628c44c5 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/metrics/index.d.ts +142 -0
- package/dist/src/metrics/index.d.ts.map +1 -1
- package/dist/typedoc-urls.json +210 -0
- package/package.json +1 -1
- package/src/metrics/index.ts +166 -0
|
@@ -124,6 +124,126 @@ export interface CounterGroup<T extends string = any> {
|
|
|
124
124
|
*/
|
|
125
125
|
reset(): void;
|
|
126
126
|
}
|
|
127
|
+
export interface HistogramOptions extends MetricOptions {
|
|
128
|
+
/**
|
|
129
|
+
* Buckets for the histogram
|
|
130
|
+
*/
|
|
131
|
+
buckets?: number[];
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Create tracked metrics that are expensive to calculate by passing
|
|
135
|
+
* a function that is only invoked when metrics are being scraped
|
|
136
|
+
*/
|
|
137
|
+
export interface CalculatedHistogramOptions<T = number> extends HistogramOptions {
|
|
138
|
+
/**
|
|
139
|
+
* An optional function invoked to calculate the component metric instead of
|
|
140
|
+
* using `.observe`
|
|
141
|
+
*/
|
|
142
|
+
calculate: CalculateMetric<T>;
|
|
143
|
+
}
|
|
144
|
+
export interface Histogram {
|
|
145
|
+
/**
|
|
146
|
+
* Observe the passed value
|
|
147
|
+
*/
|
|
148
|
+
observe(value: number): void;
|
|
149
|
+
/**
|
|
150
|
+
* Reset this histogram to its default value
|
|
151
|
+
*/
|
|
152
|
+
reset(): void;
|
|
153
|
+
/**
|
|
154
|
+
* Start a timed metric, call the returned function to
|
|
155
|
+
* stop the timer
|
|
156
|
+
*/
|
|
157
|
+
timer(): StopTimer;
|
|
158
|
+
}
|
|
159
|
+
export interface HistogramGroup<T extends string = any> {
|
|
160
|
+
/**
|
|
161
|
+
* Observe the passed value for the named key in the group
|
|
162
|
+
*/
|
|
163
|
+
observe(values: Partial<Record<T, number>>): void;
|
|
164
|
+
/**
|
|
165
|
+
* Reset the passed key in this histogram group to its default value
|
|
166
|
+
* or all keys if no key is passed
|
|
167
|
+
*/
|
|
168
|
+
reset(): void;
|
|
169
|
+
/**
|
|
170
|
+
* Start a timed metric for the named key in the group, call
|
|
171
|
+
* the returned function to stop the timer
|
|
172
|
+
*/
|
|
173
|
+
timer(key: string): StopTimer;
|
|
174
|
+
}
|
|
175
|
+
export interface SummaryOptions extends MetricOptions {
|
|
176
|
+
/**
|
|
177
|
+
* Percentiles for the summary
|
|
178
|
+
*/
|
|
179
|
+
percentiles?: number[];
|
|
180
|
+
/**
|
|
181
|
+
* Configure how old a bucket can be before it is reset for sliding window
|
|
182
|
+
*/
|
|
183
|
+
maxAgeSeconds?: number;
|
|
184
|
+
/**
|
|
185
|
+
* Configure how many buckets in the sliding window
|
|
186
|
+
*/
|
|
187
|
+
ageBuckets?: number;
|
|
188
|
+
/**
|
|
189
|
+
* Remove entries without any new values in the last `maxAgeSeconds`
|
|
190
|
+
*/
|
|
191
|
+
pruneAgedBuckets?: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* Control compression of data in t-digest
|
|
194
|
+
*/
|
|
195
|
+
compressCount?: number;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Create tracked metrics that are expensive to calculate by passing
|
|
199
|
+
* a function that is only invoked when metrics are being scraped
|
|
200
|
+
*/
|
|
201
|
+
export interface CalculatedSummaryOptions<T = number> extends SummaryOptions {
|
|
202
|
+
/**
|
|
203
|
+
* An optional function invoked to calculate the component metric instead of
|
|
204
|
+
* using `.observe`
|
|
205
|
+
*/
|
|
206
|
+
calculate: CalculateMetric<T>;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* A tracked summary loosely based on the Summary interface exposed
|
|
210
|
+
* by the prom-client module
|
|
211
|
+
*/
|
|
212
|
+
export interface Summary {
|
|
213
|
+
/**
|
|
214
|
+
* Observe the passed value
|
|
215
|
+
*/
|
|
216
|
+
observe(value: number): void;
|
|
217
|
+
/**
|
|
218
|
+
* Reset this summary to its default value
|
|
219
|
+
*/
|
|
220
|
+
reset(): void;
|
|
221
|
+
/**
|
|
222
|
+
* Start a timed metric, call the returned function to
|
|
223
|
+
* stop the timer
|
|
224
|
+
*/
|
|
225
|
+
timer(): StopTimer;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* A group of tracked summaries loosely based on the Summary interface
|
|
229
|
+
* exposed by the prom-client module
|
|
230
|
+
*/
|
|
231
|
+
export interface SummaryGroup<T extends string = any> {
|
|
232
|
+
/**
|
|
233
|
+
* Observe the passed value for the named key in the group
|
|
234
|
+
*/
|
|
235
|
+
observe(values: Partial<Record<T, number>>): void;
|
|
236
|
+
/**
|
|
237
|
+
* Reset the passed key in this summary group to its default value
|
|
238
|
+
* or all keys if no key is passed
|
|
239
|
+
*/
|
|
240
|
+
reset(): void;
|
|
241
|
+
/**
|
|
242
|
+
* Start a timed metric for the named key in the group, call
|
|
243
|
+
* the returned function to stop the timer
|
|
244
|
+
*/
|
|
245
|
+
timer(key: string): StopTimer;
|
|
246
|
+
}
|
|
127
247
|
/**
|
|
128
248
|
* The libp2p metrics tracking object. This interface is only concerned
|
|
129
249
|
* with the collection of metrics, please see the individual implementations
|
|
@@ -299,5 +419,27 @@ export interface Metrics {
|
|
|
299
419
|
* method on the returned counter group object
|
|
300
420
|
*/
|
|
301
421
|
registerCounterGroup: ((name: string, options?: MetricOptions) => CounterGroup) & ((name: string, options: CalculatedMetricOptions<Record<string, number>>) => void);
|
|
422
|
+
/**
|
|
423
|
+
* Register an arbitrary histogram. Call this to set help/labels for histograms
|
|
424
|
+
* and observe them by calling methods on the returned histogram object
|
|
425
|
+
*/
|
|
426
|
+
registerHistogram: ((name: string, options?: HistogramOptions) => Histogram) & ((name: string, options: CalculatedHistogramOptions) => void);
|
|
427
|
+
/**
|
|
428
|
+
* Register a a group of related histograms. Call this to set help/labels for
|
|
429
|
+
* groups of related histograms that will be updated with by calling the `.observe`
|
|
430
|
+
* method on the returned histogram group object
|
|
431
|
+
*/
|
|
432
|
+
registerHistogramGroup: ((name: string, options?: HistogramOptions) => HistogramGroup) & ((name: string, options: CalculatedHistogramOptions<Record<string, number>>) => void);
|
|
433
|
+
/**
|
|
434
|
+
* Register an arbitrary summary. Call this to set help/labels for summaries
|
|
435
|
+
* and observe them by calling methods on the returned summary object
|
|
436
|
+
*/
|
|
437
|
+
registerSummary: ((name: string, options?: SummaryOptions) => Summary) & ((name: string, options: CalculatedSummaryOptions) => void);
|
|
438
|
+
/**
|
|
439
|
+
* Register a a group of related summaries. Call this to set help/labels for
|
|
440
|
+
* groups of related summaries that will be updated with by calling the `.observe`
|
|
441
|
+
* method on the returned summary group object
|
|
442
|
+
*/
|
|
443
|
+
registerSummaryGroup: ((name: string, options?: SummaryOptions) => SummaryGroup) & ((name: string, options: CalculatedSummaryOptions<Record<string, number>>) => void);
|
|
302
444
|
}
|
|
303
445
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/metrics/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAErF;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;AAExE;;;GAGG;AACH,MAAM,WAAW,uBAAuB,CAAC,CAAC,GAAG,MAAM,CAAE,SAAQ,aAAa;IACxE;;;OAGG;IACH,SAAS,EAAE,eAAe,CAAC,CAAC,CAAC,CAAA;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IA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C,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAAK,IAAI,CAAC,CAAA;IAEpK;;;OAGG;IACH,iBAAiB,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,KAAK,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,0BAA0B,KAAK,IAAI,CAAC,CAAA;IAE5I;;;;OAIG;IACH,sBAAsB,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,KAAK,cAAc,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,0BAA0B,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAAK,IAAI,CAAC,CAAA;IAE9K;;;OAGG;IACH,eAAe,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,wBAAwB,KAAK,IAAI,CAAC,CAAA;IAEpI;;;;OAIG;IACH,oBAAoB,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,KAAK,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAAK,IAAI,CAAC,CAAA;CACvK"}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
{
|
|
2
|
+
"FaultTolerance": "https://libp2p.github.io/js-libp2p/enums/_libp2p_interface.FaultTolerance.html",
|
|
3
|
+
"TopicValidatorResult": "https://libp2p.github.io/js-libp2p/enums/_libp2p_interface.TopicValidatorResult.html",
|
|
4
|
+
"AbortError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.AbortError.html",
|
|
5
|
+
"AlreadyStartedError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.AlreadyStartedError.html",
|
|
6
|
+
"ConnectionClosedError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.ConnectionClosedError.html",
|
|
7
|
+
"ConnectionClosingError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.ConnectionClosingError.html",
|
|
8
|
+
"ConnectionFailedError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.ConnectionFailedError.html",
|
|
9
|
+
"DialError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.DialError.html",
|
|
10
|
+
"InvalidCIDError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.InvalidCIDError.html",
|
|
11
|
+
"InvalidCryptoExchangeError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.InvalidCryptoExchangeError.html",
|
|
12
|
+
"InvalidMessageError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.InvalidMessageError.html",
|
|
13
|
+
"InvalidMultiaddrError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.InvalidMultiaddrError.html",
|
|
14
|
+
"InvalidMultihashError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.InvalidMultihashError.html",
|
|
15
|
+
"InvalidParametersError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.InvalidParametersError.html",
|
|
16
|
+
"InvalidPeerIdError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.InvalidPeerIdError.html",
|
|
17
|
+
"InvalidPrivateKeyError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.InvalidPrivateKeyError.html",
|
|
18
|
+
"InvalidPublicKeyError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.InvalidPublicKeyError.html",
|
|
19
|
+
"LimitedConnectionError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.LimitedConnectionError.html",
|
|
20
|
+
"ListenError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.ListenError.html",
|
|
21
|
+
"MuxerClosedError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.MuxerClosedError.html",
|
|
22
|
+
"NotFoundError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.NotFoundError.html",
|
|
23
|
+
"NotStartedError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.NotStartedError.html",
|
|
24
|
+
"ProtocolError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.ProtocolError.html",
|
|
25
|
+
"StreamResetError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.StreamResetError.html",
|
|
26
|
+
"StreamStateError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.StreamStateError.html",
|
|
27
|
+
"TimeoutError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.TimeoutError.html",
|
|
28
|
+
"TooManyInboundProtocolStreamsError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.TooManyInboundProtocolStreamsError.html",
|
|
29
|
+
"TooManyOutboundProtocolStreamsError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.TooManyOutboundProtocolStreamsError.html",
|
|
30
|
+
"TypedEventEmitter": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.TypedEventEmitter.html",
|
|
31
|
+
"UnexpectedPeerError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.UnexpectedPeerError.html",
|
|
32
|
+
"UnsupportedKeyTypeError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.UnsupportedKeyTypeError.html",
|
|
33
|
+
"UnsupportedOperationError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.UnsupportedOperationError.html",
|
|
34
|
+
"UnsupportedProtocolError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.UnsupportedProtocolError.html",
|
|
35
|
+
"AbortOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.AbortOptions.html",
|
|
36
|
+
".:AbortOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.AbortOptions.html",
|
|
37
|
+
"Address": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Address.html",
|
|
38
|
+
"AddressSorter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.AddressSorter.html",
|
|
39
|
+
".:AddressSorter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.AddressSorter.html",
|
|
40
|
+
"CalculatedHistogramOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.CalculatedHistogramOptions.html",
|
|
41
|
+
"CalculatedMetricOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.CalculatedMetricOptions.html",
|
|
42
|
+
"CalculatedSummaryOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.CalculatedSummaryOptions.html",
|
|
43
|
+
"ComponentLogger": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.ComponentLogger.html",
|
|
44
|
+
".:ComponentLogger": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.ComponentLogger.html",
|
|
45
|
+
"Connection": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Connection.html",
|
|
46
|
+
"ConnectionEncrypter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.ConnectionEncrypter.html",
|
|
47
|
+
"ConnectionGater": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.ConnectionGater.html",
|
|
48
|
+
"ConnectionHandler": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.ConnectionHandler.html",
|
|
49
|
+
"ConnectionLimits": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.ConnectionLimits.html",
|
|
50
|
+
"ConnectionProtector": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.ConnectionProtector.html",
|
|
51
|
+
"ConnectionTimeline": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.ConnectionTimeline.html",
|
|
52
|
+
"ContentRouting": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.ContentRouting.html",
|
|
53
|
+
"ContentRoutingProvider": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.ContentRoutingProvider.html",
|
|
54
|
+
"Counter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Counter.html",
|
|
55
|
+
"CounterGroup": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.CounterGroup.html",
|
|
56
|
+
"CreateListenerOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.CreateListenerOptions.html",
|
|
57
|
+
"DialOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.DialOptions.html",
|
|
58
|
+
".:DialOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.DialOptions.html",
|
|
59
|
+
"DialProtocolOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.DialProtocolOptions.html",
|
|
60
|
+
".:DialProtocolOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.DialProtocolOptions.html",
|
|
61
|
+
"DialTransportOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.DialTransportOptions.html",
|
|
62
|
+
"Ed25519PeerId": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Ed25519PeerId.html",
|
|
63
|
+
"Ed25519PrivateKey": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Ed25519PrivateKey.html",
|
|
64
|
+
"Ed25519PublicKey": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Ed25519PublicKey.html",
|
|
65
|
+
"Envelope": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Envelope.html",
|
|
66
|
+
"EventCallback": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.EventCallback.html",
|
|
67
|
+
"EventObject": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.EventObject.html",
|
|
68
|
+
"Histogram": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Histogram.html",
|
|
69
|
+
"HistogramGroup": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.HistogramGroup.html",
|
|
70
|
+
"HistogramOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.HistogramOptions.html",
|
|
71
|
+
"IdentifyResult": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.IdentifyResult.html",
|
|
72
|
+
".:IdentifyResult": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.IdentifyResult.html",
|
|
73
|
+
"IncomingStreamData": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.IncomingStreamData.html",
|
|
74
|
+
"IsDialableOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.IsDialableOptions.html",
|
|
75
|
+
".:IsDialableOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.IsDialableOptions.html",
|
|
76
|
+
"Libp2p": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Libp2p.html",
|
|
77
|
+
".:Libp2p": "https://libp2p.github.io/js-libp2p/interfaces/libp2p.index.Libp2p.html",
|
|
78
|
+
"Libp2pEvents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Libp2pEvents.html",
|
|
79
|
+
".:Libp2pEvents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Libp2pEvents.html",
|
|
80
|
+
"Listener": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Listener.html",
|
|
81
|
+
"ListenerEvents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.ListenerEvents.html",
|
|
82
|
+
"Logger": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Logger.html",
|
|
83
|
+
".:Logger": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Logger.html",
|
|
84
|
+
"LoggerOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.LoggerOptions.html",
|
|
85
|
+
".:LoggerOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.LoggerOptions.html",
|
|
86
|
+
"Metric": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Metric.html",
|
|
87
|
+
"MetricGroup": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.MetricGroup.html",
|
|
88
|
+
"MetricOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.MetricOptions.html",
|
|
89
|
+
"Metrics": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Metrics.html",
|
|
90
|
+
"MultiaddrConnection": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.MultiaddrConnection.html",
|
|
91
|
+
"MultiaddrConnectionTimeline": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.MultiaddrConnectionTimeline.html",
|
|
92
|
+
"MultiaddrFilter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.MultiaddrFilter.html",
|
|
93
|
+
"NewStreamOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.NewStreamOptions.html",
|
|
94
|
+
"NodeInfo": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.NodeInfo.html",
|
|
95
|
+
".:NodeInfo": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.NodeInfo.html",
|
|
96
|
+
"Peer": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Peer.html",
|
|
97
|
+
"PeerData": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PeerData.html",
|
|
98
|
+
"PeerDiscovery": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PeerDiscovery.html",
|
|
99
|
+
"PeerDiscoveryEvents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PeerDiscoveryEvents.html",
|
|
100
|
+
"PeerDiscoveryProvider": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PeerDiscoveryProvider.html",
|
|
101
|
+
"PeerInfo": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PeerInfo.html",
|
|
102
|
+
"PeerQuery": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PeerQuery.html",
|
|
103
|
+
"PeerQueryFilter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PeerQueryFilter.html",
|
|
104
|
+
"PeerQueryOrder": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PeerQueryOrder.html",
|
|
105
|
+
"PeerRouting": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PeerRouting.html",
|
|
106
|
+
"PeerRoutingProvider": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PeerRoutingProvider.html",
|
|
107
|
+
"PeerStore": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PeerStore.html",
|
|
108
|
+
"PeerStreamEvents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PeerStreamEvents.html",
|
|
109
|
+
"PeerStreams": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PeerStreams.html",
|
|
110
|
+
"PeerUpdate": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PeerUpdate.html",
|
|
111
|
+
".:PeerUpdate": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PeerUpdate.html",
|
|
112
|
+
"PendingDial": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PendingDial.html",
|
|
113
|
+
".:PendingDial": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PendingDial.html",
|
|
114
|
+
"PubSub": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PubSub.html",
|
|
115
|
+
"PubSubEvents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PubSubEvents.html",
|
|
116
|
+
"PubSubInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PubSubInit.html",
|
|
117
|
+
"PubSubRPC": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PubSubRPC.html",
|
|
118
|
+
"PubSubRPCMessage": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PubSubRPCMessage.html",
|
|
119
|
+
"PubSubRPCSubscription": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PubSubRPCSubscription.html",
|
|
120
|
+
"PublishResult": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.PublishResult.html",
|
|
121
|
+
"RSAPeerId": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.RSAPeerId.html",
|
|
122
|
+
"RSAPrivateKey": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.RSAPrivateKey.html",
|
|
123
|
+
"RSAPublicKey": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.RSAPublicKey.html",
|
|
124
|
+
"Record": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Record.html",
|
|
125
|
+
"RoutingOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.RoutingOptions.html",
|
|
126
|
+
".:RoutingOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.RoutingOptions.html",
|
|
127
|
+
"Secp256k1PeerId": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Secp256k1PeerId.html",
|
|
128
|
+
"Secp256k1PrivateKey": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Secp256k1PrivateKey.html",
|
|
129
|
+
"Secp256k1PublicKey": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Secp256k1PublicKey.html",
|
|
130
|
+
"SecureConnectionOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.SecureConnectionOptions.html",
|
|
131
|
+
"SecuredConnection": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.SecuredConnection.html",
|
|
132
|
+
"SignedMessage": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.SignedMessage.html",
|
|
133
|
+
"SignedPeerRecord": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.SignedPeerRecord.html",
|
|
134
|
+
".:SignedPeerRecord": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.SignedPeerRecord.html",
|
|
135
|
+
"Startable": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Startable.html",
|
|
136
|
+
"StopTimer": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.StopTimer.html",
|
|
137
|
+
"Stream": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Stream.html",
|
|
138
|
+
"StreamHandler": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.StreamHandler.html",
|
|
139
|
+
"StreamHandlerOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.StreamHandlerOptions.html",
|
|
140
|
+
"StreamHandlerRecord": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.StreamHandlerRecord.html",
|
|
141
|
+
"StreamMuxer": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.StreamMuxer.html",
|
|
142
|
+
"StreamMuxerFactory": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.StreamMuxerFactory.html",
|
|
143
|
+
"StreamMuxerInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.StreamMuxerInit.html",
|
|
144
|
+
"StreamTimeline": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.StreamTimeline.html",
|
|
145
|
+
"SubscriptionChangeData": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.SubscriptionChangeData.html",
|
|
146
|
+
"Summary": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Summary.html",
|
|
147
|
+
"SummaryGroup": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.SummaryGroup.html",
|
|
148
|
+
"SummaryOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.SummaryOptions.html",
|
|
149
|
+
"Tag": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Tag.html",
|
|
150
|
+
"TagOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.TagOptions.html",
|
|
151
|
+
"TopicValidatorFn": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.TopicValidatorFn.html",
|
|
152
|
+
"Topology": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Topology.html",
|
|
153
|
+
"TopologyFilter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.TopologyFilter.html",
|
|
154
|
+
"Transport": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Transport.html",
|
|
155
|
+
"TypedEventTarget": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.TypedEventTarget.html",
|
|
156
|
+
"URLPeerId": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.URLPeerId.html",
|
|
157
|
+
"UnsignedMessage": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.UnsignedMessage.html",
|
|
158
|
+
"Upgrader": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.Upgrader.html",
|
|
159
|
+
"UpgraderOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.UpgraderOptions.html",
|
|
160
|
+
"CalculateMetric": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.CalculateMetric.html",
|
|
161
|
+
"ConnectionStatus": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.ConnectionStatus.html",
|
|
162
|
+
"Direction": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.Direction.html",
|
|
163
|
+
"EventHandler": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.EventHandler.html",
|
|
164
|
+
"InboundConnectionUpgradeEvents": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.InboundConnectionUpgradeEvents.html",
|
|
165
|
+
"KeyType": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.KeyType.html",
|
|
166
|
+
"Libp2pStatus": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.Libp2pStatus.html",
|
|
167
|
+
".:Libp2pStatus": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.Libp2pStatus.html",
|
|
168
|
+
"Message": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.Message.html",
|
|
169
|
+
"OpenConnectionProgressEvents": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.OpenConnectionProgressEvents.html",
|
|
170
|
+
".:OpenConnectionProgressEvents": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.OpenConnectionProgressEvents.html",
|
|
171
|
+
"OutboundConnectionUpgradeEvents": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.OutboundConnectionUpgradeEvents.html",
|
|
172
|
+
"PeerId": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.PeerId.html",
|
|
173
|
+
"PeerIdType": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.PeerIdType.html",
|
|
174
|
+
"PendingDialStatus": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.PendingDialStatus.html",
|
|
175
|
+
".:PendingDialStatus": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.PendingDialStatus.html",
|
|
176
|
+
"PrivateKey": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.PrivateKey.html",
|
|
177
|
+
"PublicKey": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.PublicKey.html",
|
|
178
|
+
"ReadStatus": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.ReadStatus.html",
|
|
179
|
+
"ServiceMap": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.ServiceMap.html",
|
|
180
|
+
".:ServiceMap": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.ServiceMap.html",
|
|
181
|
+
"SignaturePolicy": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.SignaturePolicy.html",
|
|
182
|
+
"StreamStatus": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.StreamStatus.html",
|
|
183
|
+
"TransportManagerDialProgressEvents": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.TransportManagerDialProgressEvents.html",
|
|
184
|
+
".:TransportManagerDialProgressEvents": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.TransportManagerDialProgressEvents.html",
|
|
185
|
+
"WriteStatus": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.WriteStatus.html",
|
|
186
|
+
"KEEP_ALIVE": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.KEEP_ALIVE.html",
|
|
187
|
+
"StrictNoSign": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.StrictNoSign.html",
|
|
188
|
+
"StrictSign": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.StrictSign.html",
|
|
189
|
+
"connectionSymbol": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.connectionSymbol.html",
|
|
190
|
+
"contentRoutingSymbol": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.contentRoutingSymbol.html",
|
|
191
|
+
"peerDiscoverySymbol": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.peerDiscoverySymbol.html",
|
|
192
|
+
"peerIdSymbol": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.peerIdSymbol.html",
|
|
193
|
+
"peerRoutingSymbol": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.peerRoutingSymbol.html",
|
|
194
|
+
"pubSubSymbol": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.pubSubSymbol.html",
|
|
195
|
+
"serviceCapabilities": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.serviceCapabilities.html",
|
|
196
|
+
".:serviceCapabilities": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.serviceCapabilities.html",
|
|
197
|
+
"serviceDependencies": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.serviceDependencies.html",
|
|
198
|
+
".:serviceDependencies": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.serviceDependencies.html",
|
|
199
|
+
"transportSymbol": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.transportSymbol.html",
|
|
200
|
+
"isConnection": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.isConnection.html",
|
|
201
|
+
"isPeerId": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.isPeerId.html",
|
|
202
|
+
"isPrivateKey": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.isPrivateKey.html",
|
|
203
|
+
"isPubSub": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.isPubSub.html",
|
|
204
|
+
"isPublicKey": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.isPublicKey.html",
|
|
205
|
+
"isStartable": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.isStartable.html",
|
|
206
|
+
"isTransport": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.isTransport.html",
|
|
207
|
+
"setMaxListeners": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.setMaxListeners.html",
|
|
208
|
+
"start": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.start.html",
|
|
209
|
+
"stop": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.stop.html"
|
|
210
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/interface",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "The interface implemented by a libp2p node",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/interface#readme",
|
package/src/metrics/index.ts
CHANGED
|
@@ -142,6 +142,146 @@ export interface CounterGroup<T extends string = any> {
|
|
|
142
142
|
reset(): void
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
+
export interface HistogramOptions extends MetricOptions {
|
|
146
|
+
/**
|
|
147
|
+
* Buckets for the histogram
|
|
148
|
+
*/
|
|
149
|
+
buckets?: number[]
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Create tracked metrics that are expensive to calculate by passing
|
|
154
|
+
* a function that is only invoked when metrics are being scraped
|
|
155
|
+
*/
|
|
156
|
+
export interface CalculatedHistogramOptions<T = number> extends HistogramOptions {
|
|
157
|
+
/**
|
|
158
|
+
* An optional function invoked to calculate the component metric instead of
|
|
159
|
+
* using `.observe`
|
|
160
|
+
*/
|
|
161
|
+
calculate: CalculateMetric<T>
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export interface Histogram {
|
|
165
|
+
/**
|
|
166
|
+
* Observe the passed value
|
|
167
|
+
*/
|
|
168
|
+
observe(value: number): void
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Reset this histogram to its default value
|
|
172
|
+
*/
|
|
173
|
+
reset(): void
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Start a timed metric, call the returned function to
|
|
177
|
+
* stop the timer
|
|
178
|
+
*/
|
|
179
|
+
timer(): StopTimer
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export interface HistogramGroup<T extends string = any> {
|
|
183
|
+
/**
|
|
184
|
+
* Observe the passed value for the named key in the group
|
|
185
|
+
*/
|
|
186
|
+
observe(values: Partial<Record<T, number>>): void
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Reset the passed key in this histogram group to its default value
|
|
190
|
+
* or all keys if no key is passed
|
|
191
|
+
*/
|
|
192
|
+
reset(): void
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Start a timed metric for the named key in the group, call
|
|
196
|
+
* the returned function to stop the timer
|
|
197
|
+
*/
|
|
198
|
+
timer(key: string): StopTimer
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export interface SummaryOptions extends MetricOptions {
|
|
202
|
+
/**
|
|
203
|
+
* Percentiles for the summary
|
|
204
|
+
*/
|
|
205
|
+
percentiles?: number[]
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Configure how old a bucket can be before it is reset for sliding window
|
|
209
|
+
*/
|
|
210
|
+
maxAgeSeconds?: number
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Configure how many buckets in the sliding window
|
|
214
|
+
*/
|
|
215
|
+
ageBuckets?: number
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Remove entries without any new values in the last `maxAgeSeconds`
|
|
219
|
+
*/
|
|
220
|
+
pruneAgedBuckets?: boolean
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Control compression of data in t-digest
|
|
224
|
+
*/
|
|
225
|
+
compressCount?: number
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Create tracked metrics that are expensive to calculate by passing
|
|
230
|
+
* a function that is only invoked when metrics are being scraped
|
|
231
|
+
*/
|
|
232
|
+
export interface CalculatedSummaryOptions<T = number> extends SummaryOptions {
|
|
233
|
+
/**
|
|
234
|
+
* An optional function invoked to calculate the component metric instead of
|
|
235
|
+
* using `.observe`
|
|
236
|
+
*/
|
|
237
|
+
calculate: CalculateMetric<T>
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* A tracked summary loosely based on the Summary interface exposed
|
|
242
|
+
* by the prom-client module
|
|
243
|
+
*/
|
|
244
|
+
export interface Summary {
|
|
245
|
+
/**
|
|
246
|
+
* Observe the passed value
|
|
247
|
+
*/
|
|
248
|
+
observe(value: number): void
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Reset this summary to its default value
|
|
252
|
+
*/
|
|
253
|
+
reset(): void
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Start a timed metric, call the returned function to
|
|
257
|
+
* stop the timer
|
|
258
|
+
*/
|
|
259
|
+
timer(): StopTimer
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* A group of tracked summaries loosely based on the Summary interface
|
|
264
|
+
* exposed by the prom-client module
|
|
265
|
+
*/
|
|
266
|
+
export interface SummaryGroup<T extends string = any> {
|
|
267
|
+
/**
|
|
268
|
+
* Observe the passed value for the named key in the group
|
|
269
|
+
*/
|
|
270
|
+
observe(values: Partial<Record<T, number>>): void
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Reset the passed key in this summary group to its default value
|
|
274
|
+
* or all keys if no key is passed
|
|
275
|
+
*/
|
|
276
|
+
reset(): void
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Start a timed metric for the named key in the group, call
|
|
280
|
+
* the returned function to stop the timer
|
|
281
|
+
*/
|
|
282
|
+
timer(key: string): StopTimer
|
|
283
|
+
}
|
|
284
|
+
|
|
145
285
|
/**
|
|
146
286
|
* The libp2p metrics tracking object. This interface is only concerned
|
|
147
287
|
* with the collection of metrics, please see the individual implementations
|
|
@@ -322,4 +462,30 @@ export interface Metrics {
|
|
|
322
462
|
* method on the returned counter group object
|
|
323
463
|
*/
|
|
324
464
|
registerCounterGroup: ((name: string, options?: MetricOptions) => CounterGroup) & ((name: string, options: CalculatedMetricOptions<Record<string, number>>) => void)
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Register an arbitrary histogram. Call this to set help/labels for histograms
|
|
468
|
+
* and observe them by calling methods on the returned histogram object
|
|
469
|
+
*/
|
|
470
|
+
registerHistogram: ((name: string, options?: HistogramOptions) => Histogram) & ((name: string, options: CalculatedHistogramOptions) => void)
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Register a a group of related histograms. Call this to set help/labels for
|
|
474
|
+
* groups of related histograms that will be updated with by calling the `.observe`
|
|
475
|
+
* method on the returned histogram group object
|
|
476
|
+
*/
|
|
477
|
+
registerHistogramGroup: ((name: string, options?: HistogramOptions) => HistogramGroup) & ((name: string, options: CalculatedHistogramOptions<Record<string, number>>) => void)
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Register an arbitrary summary. Call this to set help/labels for summaries
|
|
481
|
+
* and observe them by calling methods on the returned summary object
|
|
482
|
+
*/
|
|
483
|
+
registerSummary: ((name: string, options?: SummaryOptions) => Summary) & ((name: string, options: CalculatedSummaryOptions) => void)
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Register a a group of related summaries. Call this to set help/labels for
|
|
487
|
+
* groups of related summaries that will be updated with by calling the `.observe`
|
|
488
|
+
* method on the returned summary group object
|
|
489
|
+
*/
|
|
490
|
+
registerSummaryGroup: ((name: string, options?: SummaryOptions) => SummaryGroup) & ((name: string, options: CalculatedSummaryOptions<Record<string, number>>) => void)
|
|
325
491
|
}
|