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
parent
e929053109
commit
68f948c70b
|
@ -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>;
|
||||||
|
|
Loading…
Reference in New Issue