import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; export declare const protobufPackage = "xray.core.app.observatory"; export interface ObservationResult { $type: "xray.core.app.observatory.ObservationResult"; status: OutboundStatus[]; } export interface HealthPingMeasurementResult { $type: "xray.core.app.observatory.HealthPingMeasurementResult"; all: number; fail: number; deviation: number; average: number; max: number; min: number; } export interface OutboundStatus { $type: "xray.core.app.observatory.OutboundStatus"; /** * @Document Whether this outbound is usable * @Restriction ReadOnlyForUser */ alive: boolean; /** * @Document The time for probe request to finish. * @Type time.ms * @Restriction ReadOnlyForUser */ delay: number; /** * @Document The last error caused this outbound failed to relay probe request * @Restriction NotMachineReadable */ lastErrorReason: string; /** * @Document The outbound tag for this Server * @Type id.outboundTag */ outboundTag: string; /** * @Document The time this outbound is known to be alive * @Type id.outboundTag */ lastSeenTime: number; /** * @Document The time this outbound is tried * @Type id.outboundTag */ lastTryTime: number; healthPing: HealthPingMeasurementResult | undefined; } export interface ProbeResult { $type: "xray.core.app.observatory.ProbeResult"; /** * @Document Whether this outbound is usable * @Restriction ReadOnlyForUser */ alive: boolean; /** * @Document The time for probe request to finish. * @Type time.ms * @Restriction ReadOnlyForUser */ delay: number; /** * @Document The error caused this outbound failed to relay probe request * @Restriction NotMachineReadable */ lastErrorReason: string; } export interface Intensity { $type: "xray.core.app.observatory.Intensity"; /** * @Document The time interval for a probe request in ms. * @Type time.ms */ probeInterval: number; } export interface Config { $type: "xray.core.app.observatory.Config"; /** @Document The selectors for outbound under observation */ subjectSelector: string[]; probeUrl: string; probeInterval: number; enableConcurrency: boolean; } export declare const ObservationResult: MessageFns; export declare const HealthPingMeasurementResult: MessageFns; export declare const OutboundStatus: MessageFns; export declare const ProbeResult: MessageFns; export declare const Intensity: MessageFns; export declare const Config: MessageFns; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in Exclude]?: DeepPartial; } : Partial; export interface MessageFns { readonly $type: V; encode(message: T, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): T; fromJSON(object: any): T; toJSON(message: T): unknown; create(base?: DeepPartial): T; fromPartial(object: DeepPartial): T; } export {};