pub(crate) mod load_balancer;
pub(crate) mod models;
pub(crate) mod partition_client;
pub(crate) mod processor;
use azure_core::Result;
use models::{Checkpoint, Ownership};
#[async_trait::async_trait]
pub trait CheckpointStore: Send + Sync {
async fn claim_ownership(&self, ownerships: &[Ownership]) -> Result<Vec<Ownership>>;
async fn list_checkpoints(
&self,
namespace: &str,
event_hub_name: &str,
consumer_group: &str,
) -> Result<Vec<Checkpoint>>;
async fn list_ownerships(
&self,
namespace: &str,
event_hub_name: &str,
consumer_group: &str,
) -> Result<Vec<Ownership>>;
async fn update_checkpoint(&self, checkpoint: Checkpoint) -> Result<()>;
}
#[derive(Clone, Debug, Copy)]
pub enum ProcessorStrategy {
Balanced,
Greedy,
}