Skip to content

Commit

Permalink
refactor: apply review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Jul 7, 2024
1 parent 1fb797d commit 629991b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions postgres-native-tls/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,6 @@ where
/// Set ALPN for `TlsConnectorBuilder`
///
/// This is required when using `sslnegotiation=direct`
pub fn set_postgresql_alpn(builder: &mut TlsConnectorBuilder) -> &mut TlsConnectorBuilder {
builder.request_alpns(&["postgresql"])
pub fn set_postgresql_alpn(builder: &mut TlsConnectorBuilder) {
builder.request_alpns(&["postgresql"]);
}
1 change: 1 addition & 0 deletions postgres/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ use tokio_postgres::{Error, Socket};
/// can be specified, separated by commas. Each host will be tried in turn when connecting. Required if connecting
/// with the `connect` method.
/// * `sslnegotiation` - TLS negotiation method. If set to `direct`, the client will perform direct TLS handshake, this only works for PostgreSQL 17 and newer.
/// Note that you will need to setup ALPN of TLS client configuration to `postgresql` when using direct TLS.
/// If set to `postgres`, the default value, it follows original postgres wire protocol to perform the negotiation.
/// * `hostaddr` - Numeric IP address of host to connect to. This should be in the standard IPv4 address format,
/// e.g., 172.28.40.9. If your machine supports IPv6, you can also use those addresses.
Expand Down
1 change: 1 addition & 0 deletions tokio-postgres/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ pub enum Host {
/// can be specified, separated by commas. Each host will be tried in turn when connecting. Required if connecting
/// with the `connect` method.
/// * `sslnegotiation` - TLS negotiation method. If set to `direct`, the client will perform direct TLS handshake, this only works for PostgreSQL 17 and newer.
/// Note that you will need to setup ALPN of TLS client configuration to `postgresql` when using direct TLS.
/// If set to `postgres`, the default value, it follows original postgres wire protocol to perform the negotiation.
/// * `hostaddr` - Numeric IP address of host to connect to. This should be in the standard IPv4 address format,
/// e.g., 172.28.40.9. If your machine supports IPv6, you can also use those addresses.
Expand Down

0 comments on commit 629991b

Please sign in to comment.