ic_query/nns/node_provider/report/
mod.rs1#[cfg(feature = "host")]
2mod build;
3#[cfg(feature = "host")]
4mod cache;
5mod model;
6#[cfg(feature = "host")]
7mod refresh;
8#[cfg(feature = "host")]
9mod resolve;
10#[cfg(feature = "host")]
11mod source;
12mod text;
13
14#[cfg(feature = "host")]
15pub use build::{
16 build_nns_node_provider_info_report, build_nns_node_provider_info_report_with_source,
17 build_nns_node_provider_list_report, build_nns_node_provider_list_report_with_source,
18};
19#[cfg(feature = "host")]
20pub use cache::{nns_node_provider_cache_path, nns_node_provider_refresh_lock_path};
21#[cfg(feature = "host")]
22pub use refresh::{refresh_nns_node_provider_report, refresh_nns_node_provider_report_with_source};
23#[cfg(all(test, feature = "host"))]
24use resolve::resolve_node_provider;
25#[cfg(feature = "host")]
26pub use source::{LiveNnsNodeProviderSource, NnsNodeProviderSource, NnsNodeProviderSourceRequest};
27
28pub use model::{
29 NnsNodeProviderCacheRequest, NnsNodeProviderInfoReport, NnsNodeProviderInfoRequest,
30 NnsNodeProviderListReport, NnsNodeProviderListRequest, NnsNodeProviderRow,
31};
32#[cfg(feature = "host")]
33pub use model::{
34 NnsNodeProviderHostError, NnsNodeProviderRefreshReport, NnsNodeProviderRefreshRequest,
35};
36#[cfg(feature = "host")]
37pub use text::nns_node_provider_refresh_report_text;
38pub use text::{
39 nns_node_provider_info_report_text, nns_node_provider_list_report_text,
40 nns_node_provider_list_report_verbose_text,
41};
42
43pub const DEFAULT_NNS_SOURCE_ENDPOINT: &str = "https://icp-api.io";
44#[cfg(feature = "host")]
45pub const DEFAULT_NODE_PROVIDER_REFRESH_LOCK_STALE_SECONDS: u64 = 30 * 60;
46#[cfg(feature = "host")]
47pub const NNS_NODE_PROVIDER_LIST_REPORT_SCHEMA_VERSION: u32 = 1;
48#[cfg(feature = "host")]
49pub const NNS_NODE_PROVIDER_INFO_REPORT_SCHEMA_VERSION: u32 = 1;
50#[cfg(feature = "host")]
51pub const NNS_NODE_PROVIDER_REFRESH_REPORT_SCHEMA_VERSION: u32 = 1;
52#[cfg(feature = "host")]
53const NNS_NODE_PROVIDER_CACHE_DIR: &str = "node-provider";
54#[cfg(feature = "host")]
55const NNS_NODE_PROVIDER_CACHE_FILE: &str = "providers.json";
56
57#[cfg(feature = "host")]
58impl_nns_mainnet_network_enforcer!(NnsNodeProviderHostError);
59
60#[cfg(all(test, feature = "host"))]
61mod tests;