Skip to main content

sprite_core/
supervise.rs

1#[derive(Clone, Copy, Debug)]
2pub enum Strategy {
3    Restart,
4    Stop,
5    Escalate,
6}
7
8pub struct Supervisor {
9    strategy: Strategy,
10}
11
12impl Supervisor {
13    pub fn new(strategy: Strategy) -> Self {
14        Self { strategy }
15    }
16    pub fn strategy(&self) -> Strategy { self.strategy }
17}