rill_protocol/flow/meta/
alert.rs1use crate::flow::core::Flow;
2use crate::flow::location::Location;
3use crate::io::provider::StreamType;
4use serde::{Deserialize, Serialize};
5
6pub const ALERTS: Location = Location::new("meta:alerts");
7
8#[derive(Debug, Clone, Serialize, Deserialize)]
9pub struct AlertState {}
10
11#[allow(clippy::new_without_default)]
12impl AlertState {
13 pub fn new() -> Self {
14 Self {}
15 }
16}
17
18impl Flow for AlertState {
19 type Action = ();
20 type Event = AlertEvent;
21
22 fn stream_type() -> StreamType {
23 StreamType::from("rillrate.data.alert.v0")
24 }
25
26 fn apply(&mut self, _event: Self::Event) {}
27}
28
29#[derive(Debug, Clone, Serialize, Deserialize)]
30pub struct AlertEvent {
31 pub msg: String,
32}