CH-J Toolsspráva serverů přes SSH
Menu
Vydané zdroje

CH-J Tools

Procházejte adresáře a soubory konkrétního vydání aplikace.

Stáhnout zdroje ZIP
CH-J / Server Manager 1704 souborů
0.1.2-beta Přidáno: · Sestaveno:
availability.ts Přidáno: Datum není evidováno 950 B · 21 řádků
Kód Stáhnout soubor
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 · Zdroje jsou zveřejněny pod CH-J Proprietary Software License 1.14. Jejich dostupnost nemění licenční podmínky ani neposkytuje další oprávnění.

SHA-256 archivuac8fe790f4ba60fc098f8c985fc2656cfcc6cdc21fb34b30e308a2b54e62258f
Soubory