Page MenuHomePhabricator

D5639.diff
No OneTemporary

D5639.diff

diff --git a/services/tunnelbroker/src/cxx_bridge.rs b/services/tunnelbroker/src/cxx_bridge.rs
--- a/services/tunnelbroker/src/cxx_bridge.rs
+++ b/services/tunnelbroker/src/cxx_bridge.rs
@@ -3,5 +3,6 @@
unsafe extern "C++" {
include!("tunnelbroker/src/libcpp/Tunnelbroker.h");
pub fn initialize();
+ pub fn getConfigParameter(parameter: &str) -> Result<String>;
}
}
diff --git a/services/tunnelbroker/src/libcpp/Tunnelbroker.h b/services/tunnelbroker/src/libcpp/Tunnelbroker.h
--- a/services/tunnelbroker/src/libcpp/Tunnelbroker.h
+++ b/services/tunnelbroker/src/libcpp/Tunnelbroker.h
@@ -3,3 +3,4 @@
#include "rust/cxx.h"
void initialize();
+rust::String getConfigParameter(rust::Str parameter);
diff --git a/services/tunnelbroker/src/libcpp/Tunnelbroker.cpp b/services/tunnelbroker/src/libcpp/Tunnelbroker.cpp
--- a/services/tunnelbroker/src/libcpp/Tunnelbroker.cpp
+++ b/services/tunnelbroker/src/libcpp/Tunnelbroker.cpp
@@ -35,3 +35,9 @@
};
comm::network::AmqpManager::getInstance().init();
}
+
+rust::String getConfigParameter(rust::Str parameter) {
+ return rust::String{
+ comm::network::config::ConfigManager::getInstance().getParameter(
+ std::string{parameter})};
+}

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 9, 2:21 PM (7 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2836009
Default Alt Text
D5639.diff (1 KB)

Event Timeline