chore: expose some codes to let other projects use them (#3102)

This commit is contained in:
LFC
2024-01-05 14:54:01 +08:00
committed by GitHub
parent cdc9021160
commit e0525dbfeb
5 changed files with 8 additions and 5 deletions

View File

@@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true
[features]
testing = []
[dependencies]
api.workspace = true
arrow-flight.workspace = true

View File

@@ -24,5 +24,5 @@ pub mod heartbeat;
pub mod metrics;
pub mod region_server;
mod store;
#[cfg(test)]
mod tests;
#[cfg(any(test, feature = "testing"))]
pub mod tests;

View File

@@ -40,7 +40,7 @@ impl DatanodeManager for StandaloneDatanodeManager {
}
/// Relative to [client::region::RegionRequester]
struct RegionInvoker {
pub struct RegionInvoker {
region_server: RegionServer,
}

View File

@@ -16,4 +16,4 @@ pub mod region_failover;
pub mod region_migration;
#[cfg(test)]
mod tests;
mod utils;
pub mod utils;

View File

@@ -18,7 +18,7 @@ pub fn region_lock_key(table_id: TableId, region_number: RegionNumber) -> String
format!("{}/region-{}", table_id, region_number)
}
#[cfg(test)]
#[cfg(feature = "mock")]
pub mod mock {
use std::io::Error;
use std::sync::Arc;