mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-18 20:58:06 +00:00
clarify proxy log messages (#520)
This commit is contained in:
@ -12,6 +12,19 @@ pub enum ClientType {
|
||||
Shared,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub enum Role {
|
||||
Proxy,
|
||||
}
|
||||
|
||||
impl Role {
|
||||
pub fn as_str(&self) -> &'static str {
|
||||
match self {
|
||||
Self::Proxy => "proxy",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum Event {
|
||||
@ -75,6 +88,7 @@ pub enum EventData {
|
||||
CoverageMaxDepth(u64),
|
||||
ToolName(String),
|
||||
Region(String),
|
||||
Role(Role),
|
||||
}
|
||||
|
||||
impl EventData {
|
||||
@ -111,6 +125,7 @@ impl EventData {
|
||||
Self::Coverage(x) => ("coverage", x.to_string()),
|
||||
Self::ToolName(x) => ("tool_name", x.to_owned()),
|
||||
Self::Region(x) => ("region", x.to_owned()),
|
||||
Self::Role(x) => ("role", x.as_str().to_owned()),
|
||||
}
|
||||
}
|
||||
|
||||
@ -149,6 +164,7 @@ impl EventData {
|
||||
Self::Coverage(_) => true,
|
||||
Self::ToolName(_) => true,
|
||||
Self::Region(_) => false,
|
||||
Self::Role(_) => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user