Crate abstract_ns [−] [src]
An abstract name service library
The library abstract over DNS and allows easier switching between different nameservices (say Zookeeper or Consul instead of DNS) and provides simple mocks for testing purposes.
We're providing simple implementation based on std::net
so you can
start using the library without additional dependencies and add support
for more name services later.
The library works both for synchronous (blocking) name resolution and asynchronous stuff like rotor
Structs
Mock |
A mock resolver |
ResolverThread |
An asynchronous resolver that offloads a slow resolver to thread |
StdResolver |
A name resolver that uses libc name resolution |
Traits
AsyncResolver |
Async resolver extension trait |
BlockingResolver |
The traits denotes resolver that blocks and returns data synchronously |
Receiver |
A helper trait used to deliver final name resolve result |
Resolver |
A traits that encapsulates name resolution |
Functions
resolver_thread |
Create a ResolverThread |