diff options
author | Matthias Beyer <matthias.beyer@ifm.com> | 2022-02-10 12:45:57 +0100 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@ifm.com> | 2022-03-17 10:15:12 +0100 |
commit | f0d1764b8841058a1789f06836ca9e999a354bc3 (patch) | |
tree | 82e0f13c2affb876b65346642cc022f6687a1175 /crates/core/tedge_core/Cargo.toml | |
parent | 0adada31e7971d469487f75d5f785d2ed28b82d0 (diff) |
Add tedge_core crate
This patch adds a first implementation of the tedge_core crate.
Its implementation uses an internal `Reactor` type for hiding the actual
implementation from the TedgeApplication type. This is not strictly
necessary, but gives a bit more seperation of concerns with
configuration vs "running" implementation.
The internal buffer size for the communication buffers between
core<->plugin handler is made configurable, so that a user can fine-tune
the core in this regard.
The core itself is implemented as a `CoreTask` type, which handles the
actual message-passing. All messages are routed over this CoreTask.
This ensures that we do only have 3 communication channels in each
PluginTask:
* One for CoreTask -> PluginTask
* One for PluginTask -> CoreTask
* One for Plugin -> PluginTask
(PluginTask -> Plugin is a function call: `Plugin::handle_message()` and
thus does not need a communication channel!)
and we thus do not run into the issue of having n^2 communication
channels for the communication between the PluginTask objects.
Tracing instrumentation is added to be able to have nice logging.
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
Diffstat (limited to 'crates/core/tedge_core/Cargo.toml')
-rw-r--r-- | crates/core/tedge_core/Cargo.toml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/crates/core/tedge_core/Cargo.toml b/crates/core/tedge_core/Cargo.toml new file mode 100644 index 00000000..61ff7bea --- /dev/null +++ b/crates/core/tedge_core/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "tedge_core" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +async-trait = "0.1.52" +futures = "0.3" +serde = { version = "1.0.136", features = ["derive"] } +thiserror = "1.0.30" +tokio = { version = "1.16.1", features = ["sync", "macros"] } +toml = "0.5.8" +tracing = "0.1" + +tedge_api = { path = "../tedge_api" } + +[dev-dependencies] +anyhow = "1" +static_assertions = "1.1.0" +tokio = { version = "1.16.1", features = ["full"] } |