From ec212b2f048e0fa88ab473eebd54a52ca75796b8 Mon Sep 17 00:00:00 2001 From: Nicolas Belouin Date: Wed, 4 Sep 2024 14:30:31 +0200 Subject: [PATCH] Apply suggestions from code review Signed-off-by: Kate Goldenring Signed-off-by: Nicolas Belouin Co-authored-by: Kate Goldenring --- agent/Cargo.toml | 2 +- .../discovery_handler_registry.rs | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/agent/Cargo.toml b/agent/Cargo.toml index e67c17752..f21e16f2f 100644 --- a/agent/Cargo.toml +++ b/agent/Cargo.toml @@ -35,7 +35,7 @@ serde = "1.0.104" serde_derive = "1.0.104" serde_json = "1.0.45" serde_yaml = { version = "0.8.11", optional = true } -simple-mermaid = { version = "0.1"} # used for docs +simple-mermaid = "0.1" # used for docs thiserror = "1.0.50" tokio = { version = "1.0", features = ["rt-multi-thread", "time", "fs", "macros", "net"] } tokio-stream = { version = "0.1", features = ["net", "sync"] } diff --git a/agent/src/discovery_handler_manager/discovery_handler_registry.rs b/agent/src/discovery_handler_manager/discovery_handler_registry.rs index 8e5653ad5..27c34466e 100644 --- a/agent/src/discovery_handler_manager/discovery_handler_registry.rs +++ b/agent/src/discovery_handler_manager/discovery_handler_registry.rs @@ -1,15 +1,14 @@ -//! This modules is the heart of the discovery process handled by the agent, it is based around the [DiscoveryHandlerRegistry] -//! and uses several other structure to represent and help handling discovery related things. +//! This module is the heart of the discovery process handled by the agent, it is based around the [DiscoveryHandlerRegistry] +//! and uses several other structure to represent and help handle discovery related operations. //! -//! The [DiscoveryHandlerRegistry] keeps track of registered discovery handlers, multiple endpoints/instances of a given +//! The [DiscoveryHandlerRegistry] keeps track of registered discovery handlers. Note, multiple endpoints/instances of a given //! handler can be registered at the same time. //! -//! The [DiscoveryHandlerRegistry] also keeps track of ongoing discovery requests against those discovery handlers, there will be up -//! to one of those query (a [DiscoveryHandlerRequest] object) per Configuration. +//! The [DiscoveryHandlerRegistry] also keeps track of ongoing discovery requests against those discovery handlers. There is one discovery request (a [DiscoveryHandlerRequest] object) per Configuration. //! //! Here are some simple diagrams showing how the components interact with each other in different situations: //! -//! A new DiscoverHandler gets registered (e.g. when it connects and register to the agent registration Unix socket): +//! A new DiscoverHandler gets registered (after it connects to and registers with the agent registration Unix socket): #![doc=simple_mermaid::mermaid!("diagrams/dh_registration.mmd")] //! //! A new query is made by the Configuration Controller: