From 826b8cf1033a72adb738028810a8737d52c52ea6 Mon Sep 17 00:00:00 2001 From: xxchan Date: Wed, 18 Oct 2023 15:43:56 +0800 Subject: [PATCH] nit changes --- src/meta/node/src/lib.rs | 2 +- src/meta/service/src/meta_member_service.rs | 2 +- src/meta/src/lib.rs | 12 +++++++++++- src/meta/src/rpc/mod.rs | 9 --------- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/meta/node/src/lib.rs b/src/meta/node/src/lib.rs index 4206ef889ae83..55c7b27b0c80a 100644 --- a/src/meta/node/src/lib.rs +++ b/src/meta/node/src/lib.rs @@ -25,7 +25,7 @@ use risingwave_common::config::OverrideConfig; use risingwave_common::util::resource_util; use risingwave_common::{GIT_SHA, RW_VERSION}; use risingwave_common_heap_profiling::HeapProfiler; -use risingwave_meta::{MetaStoreBackend, *}; +use risingwave_meta::*; use risingwave_meta_service::*; pub use rpc::{ElectionClient, ElectionMember, EtcdElectionClient}; use server::{rpc_serve, MetaStoreSqlBackend}; diff --git a/src/meta/service/src/meta_member_service.rs b/src/meta/service/src/meta_member_service.rs index 1fde536fb5c5e..25c4c7ad4cc84 100644 --- a/src/meta/service/src/meta_member_service.rs +++ b/src/meta/service/src/meta_member_service.rs @@ -14,13 +14,13 @@ use either::Either; use risingwave_common::util::addr::HostAddr; +use risingwave_meta::rpc::ElectionClientRef; use risingwave_pb::common::HostAddress; use risingwave_pb::meta::meta_member_service_server::MetaMemberService; use risingwave_pb::meta::{MembersRequest, MembersResponse, MetaMember}; use tonic::{Request, Response, Status}; use crate::AddressInfo; -pub type ElectionClientRef = std::sync::Arc; #[derive(Clone)] pub struct MetaMemberServiceImpl { election_client_or_self: Either, diff --git a/src/meta/src/lib.rs b/src/meta/src/lib.rs index f07d568e4485e..e603a7dc53e8f 100644 --- a/src/meta/src/lib.rs +++ b/src/meta/src/lib.rs @@ -50,6 +50,16 @@ pub mod stream; pub mod telemetry; pub use error::{MetaError, MetaResult}; -pub use rpc::{ElectionClient, ElectionMember, EtcdElectionClient, MetaStoreBackend}; +pub use rpc::{ElectionClient, ElectionMember, EtcdElectionClient}; use crate::manager::MetaOpts; + + +#[derive(Debug)] +pub enum MetaStoreBackend { + Etcd { + endpoints: Vec, + credentials: Option<(String, String)>, + }, + Mem, +} \ No newline at end of file diff --git a/src/meta/src/rpc/mod.rs b/src/meta/src/rpc/mod.rs index f563f94db418a..99f1b51eaafce 100644 --- a/src/meta/src/rpc/mod.rs +++ b/src/meta/src/rpc/mod.rs @@ -18,15 +18,6 @@ pub mod election; pub mod intercept; pub mod metrics; -#[derive(Debug)] -pub enum MetaStoreBackend { - Etcd { - endpoints: Vec, - credentials: Option<(String, String)>, - }, - Mem, -} - pub type ElectionClientRef = std::sync::Arc; pub use election::etcd::EtcdElectionClient;