1mod advisories;
5mod comments;
7mod details;
9mod feeds;
11pub mod news;
13mod pkgbuild;
15mod search;
17pub mod status;
19
20type Result<T> = std::result::Result<T, Box<dyn std::error::Error + Send + Sync>>;
28
29pub use advisories::fetch_security_advisories;
30pub use comments::fetch_aur_comments;
31pub use details::fetch_details;
32pub use feeds::{
33 NewsFeedContext, check_circuit_breaker, extract_endpoint_pattern,
34 extract_retry_after_from_error, fetch_continuation_items, fetch_news_feed,
35 get_aur_json_changes, get_official_json_changes, increase_archlinux_backoff,
36 load_official_json_cache, official_json_cache_path, optimize_max_age_for_startup,
37 rate_limit_archlinux, record_circuit_breaker_outcome, reset_archlinux_backoff,
38 take_network_error,
39};
40pub use news::{fetch_arch_news, fetch_news_content, parse_news_html};
41pub use pkgbuild::fetch_pkgbuild_fast;
42pub use search::fetch_all_with_errors;
43pub use status::fetch_arch_status_text;
44
45#[cfg(not(target_os = "windows"))]
46#[cfg(test)]
47static TEST_MUTEX: std::sync::OnceLock<std::sync::Mutex<()>> = std::sync::OnceLock::new();
48
49#[cfg(not(target_os = "windows"))]
50#[cfg(test)]
51pub(crate) fn test_mutex() -> &'static std::sync::Mutex<()> {
58 TEST_MUTEX.get_or_init(|| std::sync::Mutex::new(()))
59}