hatchery-server 0.2.15

hq-core server: drain, operator control, tasks, m4a, provisioning, memory: one supervisor process, loopback control and health
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use thiserror::Error;

#[derive(Debug, Error)]
pub enum ServerError {
    #[error("configuration: {0}")]
    Config(String),
    #[error("subservice {name}: {message}")]
    Subservice { name: &'static str, message: String },
    #[error("io: {0}")]
    Io(#[from] std::io::Error),
}

impl ServerError {
    pub fn sub(name: &'static str, message: impl Into<String>) -> Self {
        Self::Subservice { name, message: message.into() }
    }
}