1#[cfg(feature = "host")]
4mod build;
5#[cfg(feature = "host")]
6mod live;
7mod model;
8#[cfg(feature = "host")]
9mod source;
10mod text;
11
12#[cfg(feature = "host")]
13pub use build::{
14 build_ic_boundary_node_data_centers_report,
15 build_ic_boundary_node_data_centers_report_with_source, build_ic_canister_count_report,
16 build_ic_canister_count_report_with_source, build_ic_canister_page_report,
17 build_ic_canister_page_report_with_source, build_ic_metric_report,
18 build_ic_metric_report_with_source,
19};
20#[cfg(feature = "host")]
21pub use build::{build_ic_canister_report, build_ic_canister_report_with_source};
22#[cfg(feature = "host")]
23pub use live::LiveIcSource;
24pub use model::{
25 IcBoundaryNodeDataCenterRow, IcBoundaryNodeDataCentersReport, IcBoundaryNodeDataCentersRequest,
26 IcCanisterCountReport, IcCanisterCountRequest, IcCanisterFilters, IcCanisterPageController,
27 IcCanisterPageReport, IcCanisterPageRequest, IcCanisterPageRow, IcCanisterReport,
28 IcCanisterRequest, IcCanisterUpgrade, IcDashboardReportProvenance, IcMetricKind,
29 IcMetricObservation, IcMetricQuery, IcMetricReport, IcMetricRequest, IcMetricSeries,
30};
31#[cfg(feature = "host")]
32pub use model::{
33 IcBoundaryNodeDataCentersSourceData, IcCanisterCountSourceData, IcCanisterPageSourceData,
34 IcCanisterSourceData, IcHostError, IcMetricSourceData, IcSourceRequest,
35};
36#[cfg(feature = "host")]
37pub use source::{IcCanisterCollectionSource, IcCanisterSource, IcMetricSource, IcNetworkSource};
38pub use text::{
39 ic_boundary_node_data_centers_report_text, ic_canister_count_report_text,
40 ic_canister_page_report_text, ic_canister_report_text, ic_metric_report_text,
41};
42
43pub const DEFAULT_IC_DASHBOARD_SOURCE_ENDPOINT: &str = "https://ic-api.internetcomputer.org/api/v3";
45
46pub const DEFAULT_IC_DASHBOARD_CANISTER_COLLECTION_SOURCE_ENDPOINT: &str =
48 "https://ic-api.internetcomputer.org/api/v4";
49
50pub const DEFAULT_IC_DASHBOARD_METRICS_SOURCE_ENDPOINT: &str =
52 "https://metrics-api.internetcomputer.org/api/v1";
53
54pub const DEFAULT_IC_BOUNDARY_NODE_DATA_CENTERS_SOURCE_ENDPOINT: &str =
56 "https://ic-api.internetcomputer.org/api/v4";
57
58pub const DEFAULT_IC_CANISTER_PAGE_LIMIT: u16 = 50;
60
61pub const MAX_IC_CANISTER_PAGE_LIMIT: u16 = 100;
63
64pub const DEFAULT_IC_METRIC_WINDOW_SECS: u64 = 3_600;
66
67pub const DEFAULT_IC_METRIC_STEP_SECS: u32 = 300;
69
70pub const MIN_IC_METRIC_TIMESTAMP: u64 = 1_620_432_000;
72
73pub const MAX_IC_METRIC_STEP_SECS: u32 = 259_200;
75
76pub const MAX_IC_METRIC_OBSERVATIONS_PER_SERIES: u64 = 1_000;
78
79pub const MAX_IC_BOUNDARY_NODE_DATA_CENTERS: usize = 1_000;
81
82#[cfg(feature = "host")]
83const IC_DASHBOARD_REPORT_SCHEMA_VERSION: u32 = 1;
84#[cfg(feature = "host")]
85const IC_DASHBOARD_AUTHORITY: &str = "official_ic_dashboard_api";
86#[cfg(feature = "host")]
87const IC_DASHBOARD_NETWORK: &str = "ic";
88
89#[cfg(all(test, feature = "host"))]
90mod tests;