pub fn run_and_destroy<'a, F, T>(
    cluster: &'a Cluster,
    lock: UnlockedFile,
    action: F
) -> Result<T, ClusterError>
where F: UnwindSafe + FnOnce(&'a Cluster) -> T,
Expand description

Perform action in cluster, destroying the cluster before returning.

Similar to run_and_stop except this attempts to destroy the cluster – i.e. stop the cluster and completely delete its data directory – before returning. If there are other users of the cluster – i.e. if an exclusive lock cannot be acquired during the shutdown phase – then the cluster is left running and is not destroyed.