pub type ShutdownFunc = dyn Fn(State) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> + Send + Sync;