hyperi-rustlib 2.8.1

There's plenty of sage advice out there about how to run Rust services in production at scale — config cascades, structured logging, masking secrets, multi-backend secrets management, Prometheus, OpenTelemetry, Kafka transports, tiered disk-spillover sinks, adaptive worker pools, graceful shutdown — but almost none of it as code you can just install and use. This is that code. Opinionated, drop-in, working out of the box. The patterns from blog posts, watercooler chats and beers with your Google mates as actual library — not a framework you assemble from twenty crates and 8 weeks of munging.
Documentation
// Project:   hyperi-rustlib
// File:      src/tiered_sink/error.rs
// Purpose:   TieredSink error types
// Language:  Rust
//
// License:   BUSL-1.1
// Copyright: (c) 2026 HYPERI PTY LIMITED

//! TieredSink error types.

use std::io;
use thiserror::Error;

/// Errors that can occur in TieredSink operations.
#[derive(Debug, Error)]
pub enum TieredSinkError {
    /// Failed to open or create the spool file.
    #[error("failed to open spool at {path}: {message}")]
    SpoolOpen { path: String, message: String },

    /// Spool operation failed.
    #[error("spool error: {0}")]
    Spool(String),

    /// Spool is full (max items or size reached).
    #[error("spool is full: {0}")]
    SpoolFull(String),

    /// Compression/decompression failed.
    #[error("codec error: {0}")]
    Codec(#[from] io::Error),

    /// Primary sink returned a fatal error.
    #[error("sink error: {0}")]
    Sink(String),

    /// Disk is unavailable (full or inaccessible).
    #[error("disk unavailable for spooling")]
    DiskUnavailable,

    /// Operation was cancelled.
    #[error("operation cancelled")]
    Cancelled,
}