5c99b27421
- Add remote client functions for archive, blame, and branch services - Implement fallback logic to forward requests to remote storage nodes - Add logging for forwarding operations with route details - Update Cargo.lock with new dependencies including ractor cluster libraries - Extend .gitignore with IDE and build system files - Remove outdated comments from bare repository implementation
16 lines
620 B
Rust
16 lines
620 B
Rust
use ractor::ActorRef;
|
|
use crate::actor::handler::start_node_actor;
|
|
use crate::actor::message::GitNodeMessage;
|
|
use crate::server::GitksService;
|
|
|
|
pub async fn init_actor_cluster(
|
|
service: GitksService,
|
|
storage_name: String,
|
|
grpc_addr: String,
|
|
) -> Result<(ActorRef<GitNodeMessage>, tokio::task::JoinHandle<()>), ractor::SpawnErr> {
|
|
tracing::info!(storage_name = %storage_name, grpc_addr = %grpc_addr, "initializing actor cluster");
|
|
let result = start_node_actor(service, storage_name.clone(), grpc_addr).await?;
|
|
tracing::info!(storage_name = %storage_name, "actor cluster ready");
|
|
Ok(result)
|
|
}
|