Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions payjoin-directory/src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ const DEFAULT_COLUMN: &str = "";
const PJ_V1_COLUMN: &str = "pjv1";

#[derive(Debug, Clone)]
pub(crate) struct DbPool {
pub struct DbPool {
client: Client,
timeout: Duration,
}

/// Errors pertaining to [`DbPool`]
#[derive(Debug)]
pub(crate) enum Error {
pub enum Error {
Redis(RedisError),
Timeout(tokio::time::error::Elapsed),
}
Expand Down Expand Up @@ -53,7 +53,6 @@ impl DbPool {
Ok(Self { client, timeout })
}

/// Peek using [`DEFAULT_COLUMN`] as the channel type.
pub async fn push_default(&self, mailbox_id: &ShortId, data: Vec<u8>) -> Result<()> {
self.push(mailbox_id, DEFAULT_COLUMN, data).await
}
Expand All @@ -66,7 +65,6 @@ impl DbPool {
self.push(mailbox_id, PJ_V1_COLUMN, data).await
}

/// Peek using [`PJ_V1_COLUMN`] as the channel type.
pub async fn peek_v1(&self, mailbox_id: &ShortId) -> Result<Vec<u8>> {
self.peek_with_timeout(mailbox_id, PJ_V1_COLUMN).await
}
Expand Down
Loading
Loading