@lodestar/beacon-node
Version:
A Typescript implementation of the beacon chain
43 lines • 1.34 kB
TypeScript
import { Logger } from "@lodestar/utils";
import { RegistryMetricCreator } from "../metrics/index.js";
import { MonitoringOptions } from "./options.js";
export type RemoteServiceError = {
status: string;
data: null;
};
export type Client = "beacon" | "validator";
/**
* Service for sending clients stats to a remote service (e.g. beaconcha.in)
*/
export declare class MonitoringService {
private readonly clientStats;
private readonly remoteServiceUrl;
private readonly remoteServiceHost;
private readonly options;
private readonly register;
private readonly logger;
private readonly collectDataMetric;
private readonly sendDataMetric;
private status;
private initialDelayTimeout?;
private monitoringInterval?;
private fetchAbortController?;
private pendingRequest?;
constructor(client: Client, options: Required<Pick<MonitoringOptions, "endpoint">> & MonitoringOptions, { register, logger }: {
register: RegistryMetricCreator;
logger: Logger;
});
/**
* Stop sending client stats
*/
close(): void;
/**
* Collect and send client stats
*/
send(): Promise<void>;
private collectData;
private sendData;
private nextMonitoringInterval;
private parseMonitoringEndpoint;
}
//# sourceMappingURL=service.d.ts.map