pub struct LogScenarioConfig {
pub base: BaseScheduleConfig,
pub generator: LogGeneratorConfig,
pub encoder: EncoderConfig,
}Expand description
Full configuration for a single log scenario run.
Embeds BaseScheduleConfig for the shared schedule and delivery fields,
adding only the log-specific generator and a JSON-Lines-defaulting encoder.
Fields from BaseScheduleConfig are accessible directly via Deref (e.g.
config.name, config.rate) for ergonomic read access. Struct construction
uses the explicit base field.
§Example YAML
name: app_logs
rate: 10
duration: 60s
generator:
type: template
templates:
- message: "Request from {ip} to {endpoint}"
field_pools:
ip: ["10.0.0.1", "10.0.0.2"]
endpoint: ["/api", "/health"]
severity_weights:
info: 0.7
warn: 0.2
error: 0.1
encoder:
type: json_lines
sink:
type: stdoutFields§
§base: BaseScheduleConfigShared schedule and delivery fields.
generator: LogGeneratorConfigLog generator configuration.
encoder: EncoderConfigOutput encoder. Defaults to json_lines.
Trait Implementations§
Source§impl Clone for LogScenarioConfig
impl Clone for LogScenarioConfig
Source§fn clone(&self) -> LogScenarioConfig
fn clone(&self) -> LogScenarioConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LogScenarioConfig
impl Debug for LogScenarioConfig
Source§impl Deref for LogScenarioConfig
impl Deref for LogScenarioConfig
Source§type Target = BaseScheduleConfig
type Target = BaseScheduleConfig
The resulting type after dereferencing.
Source§fn deref(&self) -> &BaseScheduleConfig
fn deref(&self) -> &BaseScheduleConfig
Dereferences the value.
Source§impl DerefMut for LogScenarioConfig
impl DerefMut for LogScenarioConfig
Source§fn deref_mut(&mut self) -> &mut BaseScheduleConfig
fn deref_mut(&mut self) -> &mut BaseScheduleConfig
Mutably dereferences the value.
Source§impl<'de> Deserialize<'de> for LogScenarioConfig
impl<'de> Deserialize<'de> for LogScenarioConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LogScenarioConfig
impl RefUnwindSafe for LogScenarioConfig
impl Send for LogScenarioConfig
impl Sync for LogScenarioConfig
impl Unpin for LogScenarioConfig
impl UnsafeUnpin for LogScenarioConfig
impl UnwindSafe for LogScenarioConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more