Function subspace_farmer::cluster::controller::controller_service

source ยท
pub async fn controller_service<NC, PG>(
    nats_client: &NatsClient,
    node_client: &NC,
    piece_getter: &PG,
    farmer_cache: &FarmerCache<ClusterCacheIndex>,
    instance: &str,
    primary_instance: bool,
) -> Result<()>
where NC: NodeClient, PG: PieceGetter + Sync,
Expand description

Create controller service that handles things like broadcasting information (for example slot notifications) as well as responding to incoming requests (like piece requests).

Implementation is using concurrency with multiple tokio tasks, but can be started multiple times per controller instance in order to parallelize more work across threads if needed.