Return an error handler that triggers a suspend and restart of the corresponding storage dataflow.
(&self, context: &'static str, id: GlobalId)
| 365 | /// Return an error handler that triggers a suspend and restart of the corresponding storage |
| 366 | /// dataflow. |
| 367 | pub fn error_handler(&self, context: &'static str, id: GlobalId) -> ErrorHandler { |
| 368 | let tx = self.internal_cmd_tx.clone(); |
| 369 | ErrorHandler::signal(move |e| { |
| 370 | tx.send(InternalStorageCommand::SuspendAndRestart { |
| 371 | id, |
| 372 | reason: format!("{context}: {e:#}"), |
| 373 | }) |
| 374 | }) |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | /// Extra context for a storage instance. |
no test coverage detected