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