Skip to content

Commit

Permalink
Use hickory-dns (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
tl-rodrigo-gryzinski authored Dec 9, 2024
1 parent 5fcfa91 commit 1b31252
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.8.2](https://github.com/TrueLayer/ginepro/compare/ginepro-v0.8.2...ginepro-v0.8.1) - 2024-12-09

### Other
- Replace `trust-dns-resolver` with `hickory-resolver`([#61](https://github.com/TrueLayer/ginepro/pull/61))

## [0.8.1](https://github.com/TrueLayer/ginepro/compare/ginepro-v0.8.0...ginepro-v0.8.1) - 2024-07-10

### Other
Expand Down
4 changes: 2 additions & 2 deletions ginepro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ginepro"
version = "0.8.1"
version = "0.8.2"
edition = "2021"
description = "A client-side gRPC channel implementation for tonic"
repository = "https://github.com/TrueLayer/ginepro"
Expand All @@ -18,7 +18,7 @@ tokio = { version = "1", features = ["full"] }
tonic = { version = "0.12", features = ["tls"] }
tower = { version = "0.4", default-features = false, features = ["discover"] }
tracing = "0.1"
trust-dns-resolver = "0.23"
hickory-resolver = { version = "0.24", features = ["tokio-runtime"] }

[dev-dependencies]
proptest = "1"
Expand Down
2 changes: 1 addition & 1 deletion ginepro/src/dns_resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
use crate::{LookupService, ServiceDefinition};
use anyhow::Context;
use hickory_resolver::{system_conf, AsyncResolver, TokioAsyncResolver};
use std::collections::HashSet;
use std::net::SocketAddr;
use trust_dns_resolver::{system_conf, AsyncResolver, TokioAsyncResolver};

/// Implements [`LookupService`] by using DNS queries to lookup [`ServiceDefinition::hostname`].
pub struct DnsResolver {
Expand Down
2 changes: 1 addition & 1 deletion ginepro/src/service_definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ impl ServiceDefinition {
pub fn from_parts<T: ToString>(hostname: T, port: u16) -> Result<Self, anyhow::Error> {
let hostname = hostname.to_string();

trust_dns_resolver::Name::from_ascii(&hostname)
hickory_resolver::Name::from_ascii(&hostname)
.map_err(anyhow::Error::from)
.context("invalid 'hostname'")?;

Expand Down
2 changes: 1 addition & 1 deletion shared_proto/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::configure()
.build_server(true)
.build_client(true)
.compile(&["proto/test.proto", "proto/echo.proto"], &["proto/"])?;
.compile_protos(&["proto/test.proto", "proto/echo.proto"], &["proto/"])?;
Ok(())
}

0 comments on commit 1b31252

Please sign in to comment.