Skip to content

Commit 2be005a

Browse files
author
Ariel Ben-Yehuda
committed
feat: implement MultiReporter
1 parent 9ed025b commit 2be005a

File tree

4 files changed

+62
-0
lines changed

4 files changed

+62
-0
lines changed

Cargo.lock

Lines changed: 51 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ aws-arn = { version = "0.3", optional = true }
1313
aws-config = { version = "1", optional = true }
1414
aws-sdk-s3 = { version = "1", optional = true }
1515
chrono = "0.4"
16+
futures = "0.3"
1617
libloading = "0.8"
1718
reqwest = { version = "0.12", default-features = false, optional = true, features = ["charset", "http2", "rustls-tls"] }
1819
serde_json = "1"

src/metadata/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,12 @@ pub struct ReportMetadata<'a> {
3030

3131
#[cfg(feature = "aws-metadata")]
3232
pub mod aws;
33+
34+
/// [private] dummy metadata to make testing easier
35+
#[cfg(test)]
36+
pub(crate) const DUMMY_METADATA: ReportMetadata<'static> = ReportMetadata {
37+
instance: &AgentMetadata::Other,
38+
start: Duration::from_secs(1),
39+
end: Duration::from_secs(2),
40+
reporting_interval: Duration::from_secs(1),
41+
};

src/reporter/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use async_trait::async_trait;
77

88
use crate::metadata::ReportMetadata;
99

10+
pub mod multi;
1011
#[cfg(feature = "s3")]
1112
pub mod s3;
1213

0 commit comments

Comments
 (0)