Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iambriccardo committed Jul 24, 2024
1 parent 265c5bb commit 6df30e2
Show file tree
Hide file tree
Showing 2 changed files with 334 additions and 28 deletions.
8 changes: 5 additions & 3 deletions relay-server/src/services/spooler/envelope_stack/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ use crate::envelope::Envelope;
mod sqlite;

pub trait EnvelopeStack {
async fn push(&mut self, envelope: Envelope);
type Error;

async fn peek(&self) -> Option<&Envelope>;
async fn push(&mut self, envelope: Box<Envelope>) -> Result<(), Self::Error>;

async fn pop(&mut self) -> Option<Envelope>;
async fn peek(&mut self) -> Result<&Box<Envelope>, Self::Error>;

async fn pop(&mut self) -> Result<Box<Envelope>, Self::Error>;
}
Loading

0 comments on commit 6df30e2

Please sign in to comment.