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 crete::environment::configure_environment;
use ipxe::IPXE_DIR; use ipxe::IPXE_DIR;
use minijinja::{Environment, context}; use minijinja::{Environment, context};
use regex::Regex; use regex::regex;
// TODO: Make this a proper async function // TODO: Make this a proper async function
pub fn get_file( pub fn get_file(
filename: impl ToString, filename: impl ToString,
http_url: impl ToString, http_url: impl ToString,
) -> impl Future<Output = Option<(Vec<u8>, &'static str)>> { ) -> impl Future<Output = Option<(Vec<u8>, &'static str)>> {
// TODO: Make this a static that is initialized once let re = regex!(r"^talos/(?<cluster>.+)/(?<node>.+)\.ya?ml$");
let re =
Regex::new(r"^talos/(?<cluster>.+)/(?<node>.+)\.ya?ml$").expect("regex should be valid");
let filename: String = filename.to_string(); let filename: String = filename.to_string();
let re = re.clone(); let re = re.clone();