mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-31 07:19:06 +00:00
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:
parent
71fffb8736
commit
dde34bb7b8
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user