Skip to content

Rearrange new DNS classes without changing behavior#9584

Open
swankjesse wants to merge 2 commits into
jwilson.0723.memory_cachefrom
jwilson.0723.rearrange
Open

Rearrange new DNS classes without changing behavior#9584
swankjesse wants to merge 2 commits into
jwilson.0723.memory_cachefrom
jwilson.0723.rearrange

Conversation

@swankjesse

Copy link
Copy Markdown
Collaborator

Transport is now DnsQuery.Factory
CachingTransport is now DnsCache
StateMachineDnsCall.Query is now DnsQuery

This is intended to make it possible to have end-users get a DnsCache instance without being exposed to the implementation details of our transports and things.

Transport is now DnsQuery.Factory
CachingTransport is now DnsCache
StateMachineDnsCall.Query is now DnsQuery

This is intended to make it possible to have end-users get a DnsCache
instance without being exposed to the implementation details of our
transports and things.
@swankjesse
swankjesse force-pushed the jwilson.0723.rearrange branch from 5d51a1e to a27c476 Compare July 24, 2026 00:28
@swankjesse
swankjesse force-pushed the jwilson.0723.rearrange branch from 1e994ef to d58be51 Compare July 24, 2026 00:37
* This is different from `Dns.Call` which returns multiple record types.
*/
@OkHttpInternalApi
interface DnsQuery {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@OkHttpInternalApi
@OptIn(ExperimentalTime::class) // We know Clock and Instant will be stable in Kotlin 2.3.
class CachingTransport<Q>(
class DnsCache(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want android apps using this with system sources, we will need to hook into network changes.

For DNS over Https it seems fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants