switchboard-node-health

Crates.ioswitchboard-node-health
lib.rsswitchboard-node-health
version0.1.0
sourcesrc
created_at2024-01-04 14:46:12.602812
updated_at2024-01-04 14:46:12.602812
descriptionHealthcheck service for Switchboard services
homepagehttps://switchboard.xyz
repository
max_upload_size
id1088698
size6,589
Jackson Jessup (jessupjn)

documentation

README

Switchboard Logo

switchboard-node-health

Healthcheck service for Switchboard services

Crates.io Badge

Discord Badge

Twitter Badge

Switchboard Documentation: docs.switchboard.xyz

Install

Run the following Cargo command in your project directory:

cargo add switchboard-node-health

Or add the following line to your Cargo.toml:

[dependencies]
switchboard-node-health = "0.1.0"

Usage

use switchboard_node_health::SwitchboardHealth;

async fn main() {
    let health = SwitchboardHealth::get_or_init().await;

    // When service is healthy
    health.set_is_ready().await;

    // When service is degraded / shutting down
    health.set_is_not_ready().await;
}
Commit count: 0

cargo fmt