systemprompt-database 0.15.2

PostgreSQL infrastructure for systemprompt.io AI governance. SQLx-backed pool, generic repository traits, and compile-time query verification. Part of the systemprompt.io AI governance pipeline.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! The error type the resilience layer itself produces.

use std::time::Duration;

#[derive(Debug, thiserror::Error)]
pub enum ResilienceError<E> {
    #[error("circuit breaker '{key}' is open; failing fast")]
    CircuitOpen { key: String },

    #[error("bulkhead '{key}' is saturated ({limit} concurrent permits in use)")]
    BulkheadFull { key: String, limit: usize },

    #[error("operation timed out after {after:?}")]
    Timeout { after: Duration },

    #[error(transparent)]
    Inner(#[from] E),
}