1import os from "os";
2import type { RecordKey } from "@atcute/lexicons";
3import type {
4 SystemsGazeBarometerCheck,
5 SystemsGazeBarometerHost,
6 SystemsGazeBarometerService,
7} from "barometer-lexicon";
8
9export interface Check {
10 record: SystemsGazeBarometerCheck.Main;
11}
12export interface Service {
13 checks: Set<RecordKey>;
14 record: SystemsGazeBarometerService.Main;
15}
16
17class Store {
18 services;
19 checks;
20 host: SystemsGazeBarometerHost.Main | null;
21 hostname: string;
22
23 constructor() {
24 this.services = new Map<RecordKey, Service>();
25 this.checks = new Map<RecordKey, Check>();
26 this.host = null;
27 this.hostname = os.hostname();
28 }
29}
30
31const store = new Store();
32export default store;