Files
crete/src/lib.rs
T
Dreaded_X 1d5a4c61be
Audit / cargo audit (push) Failing after 5m5s
feat: Added ftfp server implementation
2026-07-02 04:53:32 +02:00

32 lines
696 B
Rust

#![feature(impl_trait_in_assoc_type, path_absolute_method)]
use std::path::{Path, PathBuf};
use std::sync::OnceLock;
pub mod cluster;
pub mod environment;
pub mod node;
pub mod patch;
pub mod schematic;
pub mod secret;
pub mod tftp;
pub(crate) static REPO_PATH: OnceLock<PathBuf> = OnceLock::new();
pub fn set_repo_path(path: impl Into<PathBuf>) {
REPO_PATH
.set(path.into())
.expect("Repo path already initialized");
}
pub fn get_repo_path() -> &'static Path {
REPO_PATH.get().expect("Repo path not initialized")
}
pub fn get_talos_path() -> PathBuf {
get_repo_path().join("talos")
}
pub fn get_configs_path() -> PathBuf {
get_repo_path().join("configs")
}