config support; started more sharding

This commit is contained in:
Lev Kokotov
2022-02-08 09:25:59 -08:00
parent ef2aab3c61
commit c27a7d30dc
10 changed files with 372 additions and 40 deletions

View File

@@ -48,6 +48,7 @@ impl Client {
pub async fn startup(
mut stream: TcpStream,
client_server_map: ClientServerMap,
transaction_mode: bool,
) -> Result<Client, Error> {
loop {
// Could be StartupMessage or SSLRequest
@@ -100,7 +101,7 @@ impl Client {
write: write,
buffer: BytesMut::with_capacity(8196),
cancel_mode: false,
transaction_mode: true,
transaction_mode: transaction_mode,
process_id: process_id,
secret_key: secret_key,
client_server_map: client_server_map,
@@ -119,7 +120,7 @@ impl Client {
write: write,
buffer: BytesMut::with_capacity(8196),
cancel_mode: true,
transaction_mode: true,
transaction_mode: transaction_mode,
process_id: process_id,
secret_key: secret_key,
client_server_map: client_server_map,