restructuring
This commit is contained in:
parent
c677a142dd
commit
2660e90c51
4
justfile
4
justfile
|
@ -10,10 +10,10 @@ run *ARGS:
|
|||
cargo run {{ARGS}}
|
||||
|
||||
head-node *ARGS:
|
||||
cargo run --bin head-node --features="head"
|
||||
cargo run --bin head-node
|
||||
|
||||
worker-node *ARGS:
|
||||
cargo run --bin worker-node --features="worker"
|
||||
cargo run --bin worker-node
|
||||
|
||||
# Run 'cargo watch' to run the project (auto-recompiles)
|
||||
watch *ARGS:
|
||||
|
|
|
@ -31,16 +31,11 @@ colorful = "0.3.2"
|
|||
[build-dependencies]
|
||||
tonic-build = "0.12.2"
|
||||
|
||||
[features]
|
||||
head = []
|
||||
worker = []
|
||||
|
||||
[[bin]]
|
||||
name = "head-node"
|
||||
path = "src/head.rs"
|
||||
required-features = [ "head" ]
|
||||
|
||||
[[bin]]
|
||||
name = "worker-node"
|
||||
path = "src/worker.rs"
|
||||
required-features = [ "worker" ]
|
||||
|
|
|
@ -16,7 +16,6 @@ mod sched {
|
|||
// tonic::include_file_descriptor_set!("protocol_descriptor").into();
|
||||
}
|
||||
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(author, version, about)]
|
||||
#[command(propagate_version = true)]
|
||||
|
@ -63,8 +62,11 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
let addr = "[::1]:50051".parse()?;
|
||||
info!("Starting gRPC server on {}", addr);
|
||||
let data = crate::util::grpc::DataService::default();
|
||||
debug!("{:#?}", data);
|
||||
let auth = crate::util::grpc::AuthService::default();
|
||||
debug!("{:#?}", auth);
|
||||
let alive = crate::util::grpc::AliveCheckService::default();
|
||||
debug!("{:#?}", alive);
|
||||
let grpc_server = Server::builder()
|
||||
.add_service(sched::data_server::DataServer::new(data))
|
||||
.add_service(sched::auth_server::AuthServer::new(auth))
|
||||
|
|
|
@ -82,14 +82,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
}))
|
||||
.await?
|
||||
);
|
||||
// debug!(
|
||||
// "{:#?}",
|
||||
// auth.logout(tonic::Request::new(LogoutRequest {
|
||||
// node_id: "compute-1".to_string(),
|
||||
// }))
|
||||
// .await?
|
||||
// );
|
||||
// let _ = send_shutdown.send(());
|
||||
alive_hand.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue