mirror of
https://github.com/Noratrieb/haesli.git
synced 2026-01-15 20:25:02 +01:00
return exchanges from dashboard
This commit is contained in:
parent
40f25d1db7
commit
d77c31aaad
2 changed files with 71 additions and 2 deletions
|
|
@ -1,4 +1,9 @@
|
|||
use std::{borrow::Borrow, collections::HashMap, sync::Arc};
|
||||
use std::{
|
||||
borrow::Borrow,
|
||||
collections::HashMap,
|
||||
fmt::{Display, Formatter},
|
||||
sync::Arc,
|
||||
};
|
||||
|
||||
use crate::{newtype, Queue};
|
||||
|
||||
|
|
@ -9,6 +14,16 @@ pub enum TopicSegment {
|
|||
MultiWildcard,
|
||||
}
|
||||
|
||||
impl Display for TopicSegment {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
Self::Word(str) => str.fmt(f),
|
||||
Self::SingleWildcard => f.write_str("*"),
|
||||
Self::MultiWildcard => f.write_str("#"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum ExchangeType {
|
||||
/// Routes a message to a queue if the routing-keys are equal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue