runtime-rs: Remove un-used code

The `r#type` method is never used, so neither
are the log type constants

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
This commit is contained in:
stevenhorsman 2025-01-30 16:51:32 +00:00
parent 71fffb8736
commit dde34bb7b8

View File

@ -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<dyn Event + Send + Sync>) -> 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]