CH-J ToolsZarządzanie serwerem przez SSH
Menu
Opublikowane źródło

CH-J Tools

Przeglądaj katalogi i pliki dla konkretnego wydania aplikacji.

Pobierz źródło ZIP
CH-J / Server Manager 872 pliki
core-20261030T220507Z-61e4558d889f Dodano: · Built:
availability.ts Dodano: Data niezanotowana 950 B · 21 linie
Kod Pobierz plik PDF
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 · Źródło jest dostarczane pod CH-J Proprietary Software License 1.14. Jego dostępność nie zmienia warunków licencji ani nie przyznaje dodatkowych praw.

SHA-25677380d4805485ffa4027fbe7858b5836f197a4aa9d52358a43e2d12d018744df
Pliki