Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cumulocity mapper using actors #1909 #1922

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 45 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions crates/common/mqtt_channel/src/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,16 @@ impl From<Publish> for Message {
}
}

impl<T, U> From<(T, U)> for Message
where
T: AsRef<str>,
U: AsRef<str>,
{
fn from(value: (T, U)) -> Self {
Message::new(&Topic::new_unchecked(value.0.as_ref()), value.1.as_ref())
}
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down
1 change: 1 addition & 0 deletions crates/common/tedge_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ fs-notify = ["strum_macros", "notify"]

[dependencies]
futures = "0.3"
mqtt_channel = { path = "../mqtt_channel" }
nix = "0.24"
notify = { version = "5.0", optional = true, default-features = false }
strum_macros = { version = "0.24", optional = true }
Expand Down
1 change: 1 addition & 0 deletions crates/common/tedge_utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ pub mod file;
pub mod fs;
pub mod paths;
pub mod signals;
pub mod size_threshold;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Note] This is typically the kind of code I see no point to abstract. This is just a size comparison but adds a coupling to the mqtt_channel crate.

pub mod timers;

#[cfg(feature = "fs-notify")]
Expand Down
Loading