目录

status-checker

Automated program for checking the health of networked services.

Output Structure

The following TypeScript declarations document the structure of the program’s output, with Section being the type of the object generated. Anything that consumes this API should be able to properly display any object that conforms to these types.

type State = 'Healthy' | 'Unhealthy' | 'Offline';

interface Status {
    state: State;
    text: string;
}

interface Service {
    name: string;
    desc: string;
    status: Status;
}

interface SubSection {
    name: string;
    desc: string;
    items: Item[];
}

type Item =
    | {
          Service: Service;
          SubSection?: never;
      }
    | {
          Service?: never;
          SubSection: SubSection;
      };

interface Section {
    time: number;
    overall_state: State;
    items: Item[];
}

Running

The program is meant to be executed by a GitHub actions runner, but can be built and ran normally with cargo.

cargo run

Status is sent to stdout in JSON format.

关于
14.9 MB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号