mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
feat(drainer): added drainer which reads from redis stream and executes queries on DB (#142)
This commit is contained in:
19
crates/drainer/src/errors.rs
Normal file
19
crates/drainer/src/errors.rs
Normal file
@ -0,0 +1,19 @@
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum DrainerError {
|
||||
#[error("Error in parsing config : {0}")]
|
||||
ConfigParsingError(String),
|
||||
#[error("Error fetching stream length for stream : {0}")]
|
||||
StreamGetLengthError(String),
|
||||
#[error("Error reading from stream : {0}")]
|
||||
StreamReadError(String),
|
||||
#[error("Error triming from stream: {0}")]
|
||||
StreamTrimFailed(String),
|
||||
#[error("No entries found for stream: {0}")]
|
||||
NoStreamEntry(String),
|
||||
#[error("Error in making stream: {0} available")]
|
||||
DeleteKeyFailed(String),
|
||||
}
|
||||
|
||||
pub type DrainerResult<T> = error_stack::Result<T, DrainerError>;
|
||||
Reference in New Issue
Block a user