26 lines
540 B
Rust
26 lines
540 B
Rust
use crate::endpoint::Endpoint;
|
|
use async_trait::async_trait;
|
|
use tokio::sync::{mpsc,oneshot};
|
|
use std::sync::Arc;
|
|
use eyre::Result;
|
|
use crate::event::Event;
|
|
|
|
pub struct IrcEndpoint {
|
|
}
|
|
|
|
#[async_trait]
|
|
impl Endpoint for IrcEndpoint {
|
|
fn name(&self) -> String {
|
|
"test irc_endpoint".into()
|
|
}
|
|
|
|
fn is_active(&self) -> bool {
|
|
true
|
|
}
|
|
|
|
async fn listen(self: Arc<Self>, success_status_send: oneshot::Sender<Result<()>>,
|
|
event_receiver: mpsc::Sender<Event>) {
|
|
success_status_send.send(Ok(()));
|
|
}
|
|
}
|