41 lines
1.5 KiB
Rust
41 lines
1.5 KiB
Rust
mod assignment_runner;
|
|
mod coordinator_session;
|
|
mod daemon;
|
|
mod debug_agent;
|
|
mod node_identity;
|
|
mod source_snapshot;
|
|
mod task_artifacts;
|
|
mod task_reports;
|
|
|
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
let raw_args = std::env::args().skip(1).collect::<Vec<_>>();
|
|
match raw_args.as_slice() {
|
|
[flag] if matches!(flag.as_str(), "--version" | "-V") => {
|
|
println!("clusterflux-node {}", env!("CARGO_PKG_VERSION"));
|
|
return Ok(());
|
|
}
|
|
[flag] if matches!(flag.as_str(), "--help" | "-h") => {
|
|
println!(
|
|
"Clusterflux node worker.\n\n\
|
|
Usage: clusterflux-node --coordinator <URL> [OPTIONS]\n\n\
|
|
Options:\n \
|
|
--coordinator <URL>\n \
|
|
--tenant <TENANT> [default: tenant]\n \
|
|
--project-id <PROJECT> [default: project]\n \
|
|
--node <NODE> [default: node]\n \
|
|
--project-root <PATH>\n \
|
|
--enrollment-grant <GRANT>\n \
|
|
--public-key <KEY>\n \
|
|
--worker\n \
|
|
--emit-ready\n \
|
|
--control-poll-ms <MILLISECONDS>\n \
|
|
--assignment-poll-ms <MILLISECONDS> [default: 500]\n \
|
|
-h, --help\n \
|
|
-V, --version"
|
|
);
|
|
return Ok(());
|
|
}
|
|
_ => {}
|
|
}
|
|
daemon::run()
|
|
}
|