pub struct RunBudgetExceededEvent {
pub run_id: Uuid,
pub workflow_name: String,
pub limit_usd: Decimal,
pub spent_usd: Decimal,
pub step_budget_usd: Decimal,
pub at: DateTime<Utc>,
}Expand description
Payload of the Event::RunBudgetExceeded event.
§Examples
use chrono::Utc;
use ironflow_engine::notify::RunBudgetExceededEvent;
use rust_decimal::Decimal;
use uuid::Uuid;
let payload = RunBudgetExceededEvent {
run_id: Uuid::now_v7(),
workflow_name: "deploy".to_string(),
limit_usd: Decimal::new(200, 2),
spent_usd: Decimal::new(180, 2),
step_budget_usd: Decimal::new(50, 2),
at: Utc::now(),
};
assert_eq!(payload.limit_usd, Decimal::new(200, 2));Fields§
§run_id: UuidRun identifier.
workflow_name: StringWorkflow name.
limit_usd: DecimalThe configured cost cap in USD.
spent_usd: DecimalCost already consumed when the cap was reached, in USD.
step_budget_usd: DecimalDeclared budget of the refused step, in USD.
at: DateTime<Utc>When the refusal occurred.
Trait Implementations§
Source§impl Clone for RunBudgetExceededEvent
impl Clone for RunBudgetExceededEvent
Source§impl Debug for RunBudgetExceededEvent
impl Debug for RunBudgetExceededEvent
Source§impl<'de> Deserialize<'de> for RunBudgetExceededEvent
impl<'de> Deserialize<'de> for RunBudgetExceededEvent
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 RunBudgetExceededEvent
impl RefUnwindSafe for RunBudgetExceededEvent
impl Send for RunBudgetExceededEvent
impl Sync for RunBudgetExceededEvent
impl Unpin for RunBudgetExceededEvent
impl UnsafeUnpin for RunBudgetExceededEvent
impl UnwindSafe for RunBudgetExceededEvent
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