diff --git a/rust/worker/src/lib.rs b/rust/worker/src/lib.rs index 0267675d807..a9736a3a4a1 100644 --- a/rust/worker/src/lib.rs +++ b/rust/worker/src/lib.rs @@ -75,44 +75,3 @@ pub async fn compaction_service_entrypoint() { let mut compaction_manager_handle = system.start_component(compaction_manager); tokio::join!(compaction_manager_handle.join(), dispatcher_handle.join()); } - -pub async fn worker_entrypoint() { - let config = config::RootConfig::load(); - // Create all the core components and start them - // TODO: This should be handled by an Application struct and we can push the config into it - // for now we expose the config to pub and inject it into the components - - // The two root components are ingest, and the gRPC server - let mut system: system::System = system::System::new(); - - let mut memberlist = - match memberlist::CustomResourceMemberlistProvider::try_from_config(&config.worker).await { - Ok(memberlist) => memberlist, - Err(err) => { - println!("Failed to create memberlist component: {:?}", err); - return; - } - }; - - let mut worker_server = match server::WorkerServer::try_from_config(&config.worker).await { - Ok(worker_server) => worker_server, - Err(err) => { - println!("Failed to create worker server component: {:?}", err); - return; - } - }; - - // Boot the system - // memberlist -> (This is broken for now until we have compaction manager) NUM_THREADS x segment_ingestor -> segment_manager - // server <- segment_manager - - // memberlist.subscribe(recv); - let mut memberlist_handle = system.start_component(memberlist); - - let server_join_handle = tokio::spawn(async move { - crate::server::WorkerServer::run(worker_server).await; - }); - - // Join on all handles - let _ = tokio::join!(memberlist_handle.join(), server_join_handle,); -}