move Logfilter to the Logmessage module, change MessageHandler to a proper trait

This commit is contained in:
Chris Beck
2025-12-05 11:20:58 -07:00
parent 82ed77a098
commit a7cd3bdcde
11 changed files with 270 additions and 162 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ use conf::{Conf, Subcommands};
use hyper::service::service_fn;
use hyper_util::rt::TokioIo;
use hyper_util::server::conn::auto;
use signal_gateway::{Gateway, GatewayConfig, MessageHandler};
use signal_gateway::{Gateway, GatewayConfig};
use std::{net::SocketAddr, sync::Arc, time::Duration};
use tokio::net::TcpListener;
use tokio_util::sync::CancellationToken;
@@ -34,7 +34,7 @@ enum AdminHandlerCommand {
}
impl AdminHandlerCommand {
fn into_handler(self) -> MessageHandler {
fn into_handler(self) -> Box<dyn signal_gateway::MessageHandler> {
match self {
AdminHandlerCommand::Netcat(config) => config.into_handler(),
AdminHandlerCommand::Http(config) => config.into_handler(),