nebulous 0.1.86

A globally distributed container orchestrator
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use nebulous::select::checkpoint::select_checkpoint;
use std::error::Error;
use std::path::Path; // Path to your select.rs
                     // or "use select::select_checkpoint;" depending on how you import it.

pub fn execute(base_dir: String, criteria: String) -> Result<(), Box<dyn Error>> {
    let result = select_checkpoint(Path::new(&base_dir), &criteria)?;
    match result {
        Some(path) => {
            println!("Selected checkpoint: {}", path.display());
        }
        None => {
            println!("No matching checkpoint found.");
        }
    }

    Ok(())
}