From dde34bb7b8c6c5c0602b9b75163072f0c56fd3c2 Mon Sep 17 00:00:00 2001 From: stevenhorsman Date: Thu, 30 Jan 2025 16:51:32 +0000 Subject: [PATCH] runtime-rs: Remove un-used code The `r#type` method is never used, so neither are the log type constants Signed-off-by: stevenhorsman --- src/runtime-rs/crates/service/src/event.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/runtime-rs/crates/service/src/event.rs b/src/runtime-rs/crates/service/src/event.rs index fc5868f3a8..fa9a75147b 100644 --- a/src/runtime-rs/crates/service/src/event.rs +++ b/src/runtime-rs/crates/service/src/event.rs @@ -18,9 +18,6 @@ use containerd_shim_protos::shim::events; use containerd_shim_protos::shim_async::Events; use ttrpc::MessageHeader; -const REMOTE_FORWARDER: &str = "remote"; -const LOG_FORWARDER: &str = "log"; - // Ttrpc address passed from container runtime. // For now containerd will pass the address, and CRI-O will not. const TTRPC_ADDRESS_ENV: &str = "TTRPC_ADDRESS"; @@ -30,8 +27,6 @@ const TTRPC_ADDRESS_ENV: &str = "TTRPC_ADDRESS"; pub(crate) trait Forwarder { /// Forward an event to publisher async fn forward(&self, event: Arc) -> Result<()>; - /// Get forwarder type - async fn r#type(&self) -> String; } /// Returns an instance of `ContainerdForwarder` in the case of @@ -107,10 +102,6 @@ impl Forwarder for ContainerdForwarder { .context("forward")?; Ok(()) } - - async fn r#type(&self) -> String { - REMOTE_FORWARDER.to_string() - } } /// Events are writen into logs. @@ -141,10 +132,6 @@ impl Forwarder for LogForwarder { ); Ok(()) } - - async fn r#type(&self) -> String { - LOG_FORWARDER.to_string() - } } #[inline]