use crate::producer::ProducerRuntimeEvent;

pub(super) fn producer_event_name(event: &ProducerRuntimeEvent) -> &'static str {
    match event {
        ProducerRuntimeEvent::WarmUp { .. } => "warm_up",
        ProducerRuntimeEvent::BeginTransaction { .. } => "begin_transaction",
        ProducerRuntimeEvent::InitTransactions { .. } => "init_transactions",
        ProducerRuntimeEvent::AppendRecord { .. } => "append_record",
        ProducerRuntimeEvent::Flush { .. } => "flush",
        ProducerRuntimeEvent::CommitTransaction { .. } => "commit_transaction",
        ProducerRuntimeEvent::AbortTransaction { .. } => "abort_transaction",
        ProducerRuntimeEvent::SendOffsetsToTransaction { .. } => "send_offsets_to_transaction",
        ProducerRuntimeEvent::Shutdown { .. } => "shutdown",
    }
}
