switchgear_pingora/
lib.rs1use async_trait::async_trait;
2use std::collections::BTreeSet;
3use std::error::Error;
4use switchgear_service::api::discovery::DiscoveryBackend;
5
6pub mod balance;
7pub mod discovery;
8pub mod error;
9pub mod health;
10mod socket;
11
12#[derive(Debug, Clone)]
13pub struct PingoraLnBackendExtension {
14 pub partitions: BTreeSet<String>,
15}
16
17#[async_trait]
18pub trait PingoraBackendProvider {
19 type Error: Error + Send + Sync + 'static;
20
21 async fn backends(&self) -> Result<Vec<DiscoveryBackend>, Self::Error>;
22}