CH-J Toolsbainisteoireacht freastalaí SSH
Roghchlár
Foinse foilsithe

CH-J Tools

Brabhsáil comhadlanna agus comhaid chun feidhmchlár áirithe a scaoileadh.

Íosluchtaigh foinse ZIP
CH-J / Server Manager 1704 Comhaid
0.1.2-beta Suimigh: · Tógtha:
availability.ts Suimigh: Dáta gan taifeadadh 950 B · 21 líne
Cód Íosluchtaigh comhad
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 · Tá Foinse ar fáil faoin CH-J Proprietary Software License 1.14. Ní chuireann a infhaighteacht a athrú ar na téarmaí ceadúnais nó cearta breise a dheonú.

Cartlann SHA-256ac8fe790f4ba60fc098f8c985fc2656cfcc6cdc21fb34b30e308a2b54e62258f
Comhaid