mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-26 10:26:30 +00:00
proper failover
This commit is contained in:
@@ -8,6 +8,7 @@ use tokio::io::{AsyncReadExt, BufReader};
|
||||
use tokio::net::tcp::{OwnedReadHalf, OwnedWriteHalf};
|
||||
use tokio::net::TcpStream;
|
||||
|
||||
use crate::config::Address;
|
||||
use crate::errors::Error;
|
||||
use crate::messages::*;
|
||||
use crate::ClientServerMap;
|
||||
@@ -350,4 +351,11 @@ impl Server {
|
||||
.query(&format!("SET application_name = '{}'", name))
|
||||
.await?)
|
||||
}
|
||||
|
||||
pub fn address(&self) -> Address {
|
||||
Address {
|
||||
host: self.host.to_string(),
|
||||
port: self.port.to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user