Skip to content

Commit

Permalink
nit changes
Browse files Browse the repository at this point in the history
  • Loading branch information
xxchan committed Oct 18, 2023
1 parent bca489a commit 826b8cf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/meta/node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion src/meta/service/src/meta_member_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<dyn risingwave_meta::ElectionClient>;
#[derive(Clone)]
pub struct MetaMemberServiceImpl {
election_client_or_self: Either<ElectionClientRef, AddressInfo>,
Expand Down
12 changes: 11 additions & 1 deletion src/meta/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>,
credentials: Option<(String, String)>,
},
Mem,
}
9 changes: 0 additions & 9 deletions src/meta/src/rpc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@ pub mod election;
pub mod intercept;
pub mod metrics;

#[derive(Debug)]
pub enum MetaStoreBackend {
Etcd {
endpoints: Vec<String>,
credentials: Option<(String, String)>,
},
Mem,
}

pub type ElectionClientRef = std::sync::Arc<dyn ElectionClient>;

pub use election::etcd::EtcdElectionClient;
Expand Down

0 comments on commit 826b8cf

Please sign in to comment.