pub mod error;
pub mod limit;
pub mod lookup;
pub mod tld;
pub use error::{Error, ErrorId, ExitClass, Result};
pub use limit::{BreakerState, HostLimit, Pacer, PacingLimits, PausedHost, Refusal};
pub use lookup::{
BOOTSTRAP_URL, Delegation, Engine, Finding, Freshness, Reason, Registration, Server, Servers,
ServiceMap, Settings, Source, SourcePolicy, Status, Tally,
};
pub use tld::{
CATALOG_VERSION, Catalog, Depth, Extension, ExtensionKind, Family, Filter, Group, LengthRule,
NormalizedName, Page, Selector, Sort, SortDirection, SortKey, Suffix, SweepPlan,
normalize_name, parse_name,
};
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
#[must_use]
pub fn user_agent() -> String {
format!("reserve/{VERSION} (+https://reserve.devops.bd)")
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn the_user_agent_names_the_tool_and_its_version() {
let agent = user_agent();
assert!(agent.starts_with("reserve/"));
assert!(agent.contains(VERSION));
}
}