feat: Initial rewrite of python render tool
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
#![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(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");
|
||||
}
|
||||
|
||||
fn get_repo_path() -> &'static Path {
|
||||
REPO_PATH.get().expect("Repo path not initialized")
|
||||
}
|
||||
|
||||
fn get_talos_config_path() -> PathBuf {
|
||||
get_repo_path().join("talos")
|
||||
}
|
||||
Reference in New Issue
Block a user