1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Programmable Rust DNS control plane for the Lattice networking stack:
//! split DNS, Fake IP, address pools, and dynamic routing hooks.
//!
//! # Example
//!
//! ```
//! use dns_lattice::{DomainPattern, Name, SplitDnsPolicy, UpstreamGroupId};
//!
//! let policy = SplitDnsPolicy::builder()
//! .rule(
//! DomainPattern::suffix(Name::from_ascii("corp.internal").unwrap()),
//! UpstreamGroupId::new("corp"),
//! )
//! .build();
//!
//! let name = Name::from_ascii("host.corp.internal").unwrap();
//! assert_eq!(policy.resolve_group(&name), Some(&UpstreamGroupId::new("corp")));
//! ```
//!
//! # Facade design
//!
//! Re-exports the DNS message, matcher, and policy types from
//! `dns-lattice-model`, and the shared `Error`/`Result` pair from
//! `dns-lattice-core`. Stage 0.1 implemented the `model` layer; stage 0.2
//! adds the [`engine`] module's [`Resolver`] (construct/resolve, static
//! split-DNS routing, and an in-memory TTL/negative-caching answer cache).
//! Later stages add `server`, `upstream`, `fakeip`, and `hooks` behind this
//! same facade. See `ARCHITECTURE.md` for the full module layout.
pub use ;
pub use ;
pub use ;