mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
mononoke/sql_ext: add mysql connections
Summary: The diff adds API to create a set of connections: read, read master and write. Reviewed By: ahornby Differential Revision: D23568561 fbshipit-source-id: b3ee954604557497ed56c6b369256b6f76a1e042
This commit is contained in:
parent
77c2ae3673
commit
0ba6f9ff35
@ -10,6 +10,7 @@ include = ["src/**/*.rs"]
|
|||||||
fbinit = { git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master" }
|
fbinit = { git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master" }
|
||||||
futures_ext = { git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master" }
|
futures_ext = { git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master" }
|
||||||
sql = { git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master" }
|
sql = { git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master" }
|
||||||
|
sql_common = { git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master" }
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
async-trait = "0.1.29"
|
async-trait = "0.1.29"
|
||||||
futures-old = { package = "futures", version = "0.1" }
|
futures-old = { package = "futures", version = "0.1" }
|
||||||
|
@ -44,15 +44,15 @@ pub mod facebook {
|
|||||||
|
|
||||||
#[cfg(fbcode_build)]
|
#[cfg(fbcode_build)]
|
||||||
pub use r#impl::{
|
pub use r#impl::{
|
||||||
create_myrouter_connections, create_raw_xdb_connections,
|
create_myrouter_connections, create_mysql_connections, create_raw_xdb_connections,
|
||||||
myadmin::{MyAdmin, MyAdminLagMonitor},
|
myadmin::{MyAdmin, MyAdminLagMonitor},
|
||||||
myrouter_ready,
|
myrouter_ready,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(not(fbcode_build))]
|
#[cfg(not(fbcode_build))]
|
||||||
pub use crate::oss::{
|
pub use crate::oss::{
|
||||||
create_myrouter_connections, create_raw_xdb_connections, myrouter_ready, MyAdmin,
|
create_myrouter_connections, create_mysql_connections, create_raw_xdb_connections,
|
||||||
MyAdminLagMonitor,
|
myrouter_ready, MyAdmin, MyAdminLagMonitor,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
|
@ -43,6 +43,17 @@ pub fn create_myrouter_connections(
|
|||||||
fb_unimplemented!()
|
fb_unimplemented!()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn create_mysql_connections(
|
||||||
|
_fb: FacebookInit,
|
||||||
|
_tier: String,
|
||||||
|
_shard_id: Option<usize>,
|
||||||
|
_read_con_type: ReadConnectionType,
|
||||||
|
_pool_size_config: PoolSizeConfig,
|
||||||
|
_readonly: bool,
|
||||||
|
) -> Result<SqlConnections, Error> {
|
||||||
|
fb_unimplemented!()
|
||||||
|
}
|
||||||
|
|
||||||
pub fn myrouter_ready(
|
pub fn myrouter_ready(
|
||||||
db_addr_opt: Option<String>,
|
db_addr_opt: Option<String>,
|
||||||
mysql_options: MysqlOptions,
|
mysql_options: MysqlOptions,
|
||||||
|
Loading…
Reference in New Issue
Block a user