/**
 * 指标分类
 */ import { MetricsManager } from './common/MetricsManager' ; export interface IEndPoint { indicators : Array < IIndicator > ; group : string ; initialize ( ) ; setLogger ( logger ) ; destory ( ) ; param args invoke ( args ? ) ; /**
     * 处理查询返回结果
     */ processQueryResults ( results ? ) : any ; } /**
 * 单个指标
 */ export interface IIndicator { appName : string ; group : string ; invoke ( data ? , builder ? ) ; destory ( ) ; } /**
 * 指标构建工具
 */ export interface IBuilder { withDetail ( key , data , scope ? ) : IBuilder ; getDetails ( ) : Array < IndicatorBuilderResult > ; pretty ( format , value ) ; setPrettyMode ( prettyMode ) ; } /**
 * builder 构建完单个指标的结果
 */ export interface IndicatorBuilderResult { key : string ; data : any ; scope : IndicatorScope ; } /**
 * Indicator 最后输出的指标
 */ export interface IndicatorResultObject { key : string ; data : any ; scope : IndicatorScope ; } /**
 *  Endpoint 中聚合指标的结果
 */ export interface IIndicatorResult { setErrorMessage ( err ) ; setResult ( results ) ; } export type IndicatorType = 'singleton' | 'multiton' ; export interface Invokable { invoke ( args ? ) ; } export interface LoggerOptions { method : string ; from : string ; errType : string ; message : string ; stack : string ; } /**
 * 健康检查状态
 */ export enum HealthIndicatorStatus { UP = 'UP' , DOWN = 'DOWN' } /**
 * 指标维度
 */ export enum IndicatorScope { SYSTEM = 'SYSTEM' , APP = 'APP' , PROCESS = 'PROCESS' } /**
 * 指标结果状态
 */ export enum IndicatorResultStatus { DEFAULT = - 1 , SUCCESS = 0 , FAIL = 1 } /**
 * 代理创建新 metric 的消息
 */ export interface ProxyCreateMessage { action : string ; name : string ; type : string ; group : string ; clientId : string ; } /**
 * 代理更新 metric 的消息
 */ export interface ProxyUpdateMessage { action : string ; name : string ; method : string ; value : any ; type : string ; clientId : string ; } export interface Reporter { start ( intervalInMs ? ) ; stop ( ) ; } export interface ActuatorResource { prefix : string ; aliasPrefix ? : Array < string > ; route ( router ) ; } export interface ActuatorServer { getMetricsManager ( ) : MetricsManager ; getEndPointService ( ) : ActuatorService ; } export interface ActuatorService { start ( ) ; stop ( ) ; } export interface IPatcher { hook ( version , reply ) ; getShimmer ( ) ; getHook ( ) ; getTraceManager ( ) ; getModuleName ( ) ; run ( ) ; } export interface LoggerCollector { collect ( method , reply ) ; } export interface SpanData { name : string ; references : Array < { refType : string ; traceId : string ; spanId : string ; } > ; context : object ; timestamp : number ; duration : number ; logs : Array < { timestamp : string ; fields : any ; } > ; tags : object ; } export interface TraceData { duration : number ; spans : Array < SpanData > ; } export interface TracerReport { report ( ) ; getValue ( ) ; } export interface Long { /**
     * Returns the sum of this and the specified Long.
     */ add ( addend ) : Long ; /**
     * Returns the bitwise AND of this Long and the specified.
     */ and ( other ) : Long ; /**
     * Compares this Long's value with the specified's.
     */ compare ( other ) : number ; /**
     * Compares this Long's value with the specified's.
     */ comp ( other ) : number ; /**
     * Returns this Long divided by the specified.
     */ divide ( divisor ) : Long ; /**
     * Returns this Long divided by the specified.
     */ div ( divisor ) : Long ; /**
     * Tests if this Long's value equals the specified's.
     */ equals ( other ) : boolean ; /**
     * Tests if this Long's value equals the specified's.
     */ eq ( other ) : boolean ; /**
     * Gets the high 32 bits as a signed integer.
     */ getHighBits ( ) : number ; /**
     * Gets the high 32 bits as an unsigned integer.
     */ getHighBitsUnsigned ( ) : number ; /**
     * Gets the low 32 bits as a signed integer.
     */ getLowBits ( ) : number ; /**
     * Gets the low 32 bits as an unsigned integer.
     */ getLowBitsUnsigned ( ) : number ; /**
     * Gets the number of bits needed to represent the absolute value of this Long.
     */ getNumBitsAbs ( ) : number ; /**
     * Tests if this Long's value is greater than the specified's.
     */ greaterThan ( other ) : boolean ; /**
     * Tests if this Long's value is greater than the specified's.
     */ gt ( other ) : boolean ; /**
     * Tests if this Long's value is greater than or equal the specified's.
     */ greaterThanOrEqual ( other ) : boolean ; /**
     * Tests if this Long's value is greater than or equal the specified's.
     */ gte ( other ) : boolean ; /**
     * Tests if this Long's value is greater than or equal the specified's.
     */ ge ( other ) : boolean ; /**
     * Tests if this Long's value is even.
     */ isEven ( ) : boolean ; /**
     * Tests if this Long's value is negative.
     */ isNegative ( ) : boolean ; /**
     * Tests if this Long's value is odd.
     */ isOdd ( ) : boolean ; /**
     * Tests if this Long's value is positive.
     */ isPositive ( ) : boolean ; /**
     * Tests if this Long's value equals zero.
     */ isZero ( ) : boolean ; /**
     * Tests if this Long's value equals zero.
     */ eqz ( ) : boolean ; /**
     * Tests if this Long's value is less than the specified's.
     */ lessThan ( other ) : boolean ; /**
     * Tests if this Long's value is less than the specified's.
     */ lt ( other ) : boolean ; /**
     * Tests if this Long's value is less than or equal the specified's.
     */ lessThanOrEqual ( other ) : boolean ; /**
     * Tests if this Long's value is less than or equal the specified's.
     */ lte ( other ) : boolean ; /**
     * Tests if this Long's value is less than or equal the specified's.
     */ le ( other ) : boolean ; /**
     * Returns this Long modulo the specified.
     */ modulo ( other ) : Long ; /**
     * Returns this Long modulo the specified.
     */ mod ( other ) : Long ; /**
     * Returns this Long modulo the specified.
     */ rem ( other ) : Long ; /**
     * Returns the product of this and the specified Long.
     */ multiply ( multiplier ) : Long ; /**
     * Returns the product of this and the specified Long.
     */ mul ( multiplier ) : Long ; /**
     * Negates this Long's value.
     */ negate ( ) : Long ; /**
     * Negates this Long's value.
     */ neg ( ) : Long ; /**
     * Returns the bitwise NOT of this Long.
     */ not ( ) : Long ; /**
     * Tests if this Long's value differs from the specified's.
     */ notEquals ( other ) : boolean ; /**
     * Tests if this Long's value differs from the specified's.
     */ neq ( other ) : boolean ; /**
     * Tests if this Long's value differs from the specified's.
     */ ne ( other ) : boolean ; /**
     * Returns the bitwise OR of this Long and the specified.
     */ or ( other ) : Long ; /**
     * Returns this Long with bits shifted to the left by the given amount.
     */ shiftLeft ( numBits ) : Long ; /**
     * Returns this Long with bits shifted to the left by the given amount.
     */ shl ( numBits ) : Long ; /**
     * Returns this Long with bits arithmetically shifted to the right by the given amount.
     */ shiftRight ( numBits ) : Long ; /**
     * Returns this Long with bits arithmetically shifted to the right by the given amount.
     */ shr ( numBits ) : Long ; /**
     * Returns this Long with bits logically shifted to the right by the given amount.
     */ shiftRightUnsigned ( numBits ) : Long ; /**
     * Returns this Long with bits logically shifted to the right by the given amount.
     */ shru ( numBits ) : Long ; /**
     * Returns this Long with bits logically shifted to the right by the given amount.
     */ shr_u ( numBits ) : Long ; /**
     * Returns the difference of this and the specified Long.
     */ subtract ( subtrahend ) : Long ; /**
     * Returns the difference of this and the specified Long.
     */ sub ( subtrahend ) : Long ; /**
     * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.
     */ toInt ( ) : number ; /**
     * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).
     */ toNumber ( ) : number ; /**
     * Converts this Long to its byte representation.
     */ toBytes ( le ? ) : number [ ] ; /**
     * Converts this Long to its little endian byte representation.
     */ toBytesLE ( ) : number [ ] ; /**
     * Converts this Long to its big endian byte representation.
     */ toBytesBE ( ) : number [ ] ; /**
     * Converts this Long to signed.
     */ toSigned ( ) : Long ; /**
     * Converts the Long to a string written in the specified radix.
     */ toString ( radix ? ) : string ; /**
     * Converts this Long to unsigned.
     */ toUnsigned ( ) : Long ; /**
     * Returns the bitwise XOR of this Long and the given one.
     */ xor ( other ) : Long ; }