CH-J Tools通过 SSH 管理服务器
菜单
已发布的源代码

CH-J Tools

浏览特定应用版本的目录和文件。

下载源代码 ZIP
CH-J / Server Manager 1704 个文件
0.1.2-beta 添加时间: · 构建时间:
availability.ts 添加时间: 未记录日期 950 B · 21 行
代码 下载文件
1/** Availability of saved servers; one monitor in the Rust Core, the state is shared by the whole UI. */
2import { call, subscribe } from "../transport";
4export type AvailabilityStatus = "checking" | "online" | "offline" | "unknown" | "unverified";
5export interface ServerAvailability {
6 id: string;
7 status: AvailabilityStatus;
8 latencyMs: number | null;
9 lastSuccessAt: number | null;
10 lastAttemptAt: number | null;
11 failures: number;
12 reason: string | null;
13 via: "direct" | "jump";
15export interface AvailabilityChange { servers: ServerAvailability[]; removed?: string[]; reset?: boolean }
17export const availability = Object.freeze({
18 list: () => call<ServerAvailability[]>("core_availability_list", "availability:list"),
19 refresh: () => call<{ refreshing: boolean }>("core_availability_refresh", "availability:refresh"),
20 onChanged: (callback: (event: AvailabilityChange) => void) => subscribe("availability:changed", callback)
21});
SHA-25667f365169e7fd0974b378be25a5ac3613bbf14551cb6eeea63ed4741dc83c9d7

CH-J Proprietary Software License 1.14 · 源代码依据 CH-J Proprietary Software License 1.14 提供。公开源代码不会改变许可条款,也不会授予额外权利。

压缩包 SHA-256ac8fe790f4ba60fc098f8c985fc2656cfcc6cdc21fb34b30e308a2b54e62258f
文件