MCPcopy Create free account
hub / github.com/ZingerLittleBee/ServerBee / makeServer

Function makeServer

apps/web/src/widgets-runtime/runtime-bridge.test.ts:8–42  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

6import { mountRuntimeBridge } from './runtime-bridge'
7
8function makeServer(id: string): ServerMetrics {
9 return {
10 id,
11 name: id,
12 cpu: 0,
13 cpu_cores: null,
14 cpu_name: null,
15 mem_total: 0,
16 mem_used: 0,
17 swap_total: 0,
18 swap_used: 0,
19 disk_total: 0,
20 disk_used: 0,
21 disk_read_bytes_per_sec: 0,
22 disk_write_bytes_per_sec: 0,
23 net_in_speed: 0,
24 net_in_transfer: 0,
25 net_out_speed: 0,
26 net_out_transfer: 0,
27 load1: 0,
28 load5: 0,
29 load15: 0,
30 process_count: 0,
31 tcp_conn: 0,
32 udp_conn: 0,
33 uptime: 0,
34 last_active: 0,
35 online: true,
36 country_code: null,
37 group_id: null,
38 os: null,
39 region: null,
40 capabilities: 0
41 }
42}
43
44function setLiveServers(queryClient: QueryClient, servers: ServerMetrics[]): void {
45 projectServerCatalog(queryClient, { kind: 'ws_full_sync', servers })

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected