Skip to main content

camel_core/hot_reload/domain/
reload_action.rs

1/// Actions the coordinator can take per route.
2#[derive(Debug, Clone, PartialEq)]
3pub enum ReloadAction {
4    /// Pipeline may have changed — atomic swap (zero-downtime).
5    ///
6    /// This action is taken when the route exists and `from_uri` is unchanged.
7    /// Even if the pipeline is identical, swapping is harmless (atomic pointer swap).
8    #[cfg_attr(not(test), allow(dead_code))]
9    Swap {
10        route_id: String,
11    },
12    /// Consumer (from_uri) changed — must stop and restart.
13    Restart {
14        route_id: String,
15    },
16    /// New route — add and start.
17    Add {
18        route_id: String,
19    },
20    /// Route removed from config — stop and delete.
21    Remove {
22        route_id: String,
23    },
24    Skip {
25        route_id: String,
26    },
27}