Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit fc7ae23

Browse files
khanovapimeys
authored andcommitted
Getter for process id (sfackler#26)
Added getter for process_id
1 parent 16489a9 commit fc7ae23

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

tokio-postgres/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ postgres-protocol = { version = "0.6.6", path = "../postgres-protocol" }
5757
postgres-types = { version = "0.2.5", path = "../postgres-types" }
5858
tokio = { version = "1.27", features = ["io-util"] }
5959
tokio-util = { version = "0.7", features = ["codec"] }
60-
socket2 = { version = "0.5", features = ["all"] }
6160
rand = "0.8.5"
6261
whoami = "1.4.1"
6362

tokio-postgres/src/client.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,11 @@ impl Client {
207207
}
208208
}
209209

210+
/// Returns process_id.
211+
pub fn get_process_id(&self) -> i32 {
212+
self.process_id
213+
}
214+
210215
pub(crate) fn inner(&self) -> &Arc<InnerClient> {
211216
&self.inner
212217
}

0 commit comments

Comments
 (0)