pub fn farmer_service<F>(
nats_client: NatsClient,
farms: &[F],
identification_broadcast_interval: Duration,
primary_instance: bool,
) -> impl Future<Output = Result<()>> + Send + 'staticwhere
F: Farm,
Expand description
Create farmer service for specified farms that will be processing incoming requests and send periodic identify notifications.
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.