refactor: rename generic type parameter

Rename C -> T, to be consistent with the Balancer, and open up C for
consistent usage between the two.
pull/24376/head
Dom Dwyer 2023-03-23 14:31:03 +01:00
parent e929053109
commit 68f948c70b
No known key found for this signature in database
GPG Key ID: E4C40DBD9157879A
1 changed files with 7 additions and 7 deletions

View File

@ -68,16 +68,16 @@ pub enum RpcWriteError {
/// ///
/// [gRPC write service]: client::WriteClient /// [gRPC write service]: client::WriteClient
#[derive(Debug)] #[derive(Debug)]
pub struct RpcWrite<C> { pub struct RpcWrite<T> {
endpoints: Balancer<C>, endpoints: Balancer<T>,
} }
impl<C> RpcWrite<C> { impl<T> RpcWrite<T> {
/// Initialise a new [`RpcWrite`] that sends requests to an arbitrary /// Initialise a new [`RpcWrite`] that sends requests to an arbitrary
/// downstream Ingester, using a round-robin strategy. /// downstream Ingester, using a round-robin strategy.
pub fn new<N>(endpoints: impl IntoIterator<Item = (C, N)>, metrics: &metric::Registry) -> Self pub fn new<N>(endpoints: impl IntoIterator<Item = (T, N)>, metrics: &metric::Registry) -> Self
where where
C: Send + Sync + Debug + 'static, T: Send + Sync + Debug + 'static,
N: Into<Arc<str>>, N: Into<Arc<str>>,
{ {
Self { Self {
@ -92,9 +92,9 @@ impl<C> RpcWrite<C> {
} }
#[async_trait] #[async_trait]
impl<C> DmlHandler for RpcWrite<C> impl<T> DmlHandler for RpcWrite<T>
where where
C: WriteClient + 'static, T: WriteClient + 'static,
{ {
type WriteInput = Partitioned<HashMap<TableId, (String, MutableBatch)>>; type WriteInput = Partitioned<HashMap<TableId, (String, MutableBatch)>>;
type WriteOutput = Vec<DmlMeta>; type WriteOutput = Vec<DmlMeta>;