import { Subject } from 'rxjs'; export declare type TNetworkHealthStatus = 'unknown' | 'stable' | 'unstable' | 'down'; /** * A network health update * * @export * @interface INetworkHealth */ export interface INetworkHealth { status: TNetworkHealthStatus; score: number; } /** * The network health monitor tries to detect when the network connection to * the EVA backend becomes unstable or goes down. * If a sentinel is present it can defer most of its work to the Sentinel offline status * * @export * @class NetworkHealthMonitor */ export declare class NetworkHealthMonitor { stableThreshold: number; unstableThreshold: number; /** * The current network health status * * @type {TNetworkHealth} */ private status; /** * The numerical score used to determine the health status * * @type {number} */ private score; /** * The status change stream * * @type {Subject} */ changes$: Subject; private updateScore; /** * Creates an instance of NetworkHealthMonitor with its threshold values. * Should they not suffice applications can modify them * * @param {number} [stableThreshold=85] This score and up is considered stable * @param {number} [unstableThreshold=35] This score up to stable is considered unstable */ constructor(stableThreshold?: number, unstableThreshold?: number); /** * Return the current status and score for consumption by application clients * * @returns INetworkHealth */ getCurrentStatus(): INetworkHealth; } export declare const networkHealthMonitor: NetworkHealthMonitor;