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(crate) use advisories::fetch_security_advisories_with_context;
33pub use aur_vote::{
34 AurPackageVoteState, AurVoteContext, AurVoteError, AurVoteOutcome, VoteAction, aur_vote,
35 aur_vote_state, is_vote_state_unsupported_error,
36};
37pub use comments::fetch_aur_comments;
38pub(crate) use comments::fetch_aur_comments_with_context;
39pub use details::fetch_details;
40pub(crate) use details::fetch_details_with_context;
41pub use feeds::{
42 NewsFeedContext, check_circuit_breaker, extract_endpoint_pattern,
43 extract_retry_after_from_error, fetch_continuation_items, fetch_news_feed,
44 get_aur_json_changes, get_official_json_changes, increase_archlinux_backoff,
45 load_official_json_cache, official_json_cache_path, optimize_max_age_for_startup,
46 rate_limit_archlinux, record_circuit_breaker_outcome, reset_archlinux_backoff,
47 take_network_error,
48};
49pub(crate) use feeds::{fetch_continuation_items_with_context, fetch_news_feed_with_context};
50pub(crate) use news::fetch_arch_news_with_context;
51pub use news::{fetch_arch_news, fetch_news_content, parse_news_html};
52pub use pkgbuild::fetch_pkgbuild_fast;
53pub(crate) use pkgbuild::fetch_pkgbuild_fast_with_context;
54pub(crate) use search::fetch_all_with_context;
55pub use search::fetch_all_with_errors;
56pub use status::fetch_arch_status_text;
57
58#[cfg(not(target_os = "windows"))]
59#[cfg(test)]
60static TEST_MUTEX: std::sync::OnceLock<std::sync::Mutex<()>> = std::sync::OnceLock::new();
61
62#[cfg(not(target_os = "windows"))]
63#[cfg(test)]
64pub(crate) fn test_mutex() -> &'static std::sync::Mutex<()> {
71 TEST_MUTEX.get_or_init(|| std::sync::Mutex::new(()))
72}