use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct HealthCheckRequest {}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct HealthCheckResponse {
#[serde(default)]
pub healthy: bool,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
}
#[must_use]
pub fn link_put_subject(lattice: &str, provider_key: &str) -> String {
format!("wasmbus.rpc.{lattice}.{provider_key}.linkdefs.put")
}
#[must_use]
pub fn link_del_subject(lattice: &str, provider_key: &str) -> String {
format!("wasmbus.rpc.{lattice}.{provider_key}.linkdefs.del")
}
#[must_use]
pub fn health_subject(lattice: &str, provider_key: &str) -> String {
format!("wasmbus.rpc.{lattice}.{provider_key}.health")
}
#[must_use]
pub fn shutdown_subject(lattice: &str, provider_key: &str, link_name: &str) -> String {
format!("wasmbus.rpc.{lattice}.{provider_key}.{link_name}.shutdown")
}
#[must_use]
pub fn provider_config_update_subject(lattice: &str, provider_key: &str) -> String {
format!("wasmbus.rpc.{lattice}.{provider_key}.config.update")
}