Serve command #27

Merged
Dreaded_X merged 20 commits from feature/tftp_side into main 2026-10-21 05:15:47 +00:00
Showing only changes of commit 427ec6f61d - Show all commits
+2 -4
View File
@@ -2,16 +2,14 @@ use crete::cluster::Cluster;
use crete::environment::configure_environment;
use ipxe::IPXE_DIR;
use minijinja::{Environment, context};
use regex::Regex;
use regex::regex;
// TODO: Make this a proper async function
pub fn get_file(
filename: impl ToString,
http_url: impl ToString,
) -> impl Future<Output = Option<(Vec<u8>, &'static str)>> {
// TODO: Make this a static that is initialized once
let re =
Regex::new(r"^talos/(?<cluster>.+)/(?<node>.+)\.ya?ml$").expect("regex should be valid");
let re = regex!(r"^talos/(?<cluster>.+)/(?<node>.+)\.ya?ml$");
let filename: String = filename.to_string();
let re = re.clone();