Skip to content

Commit

Permalink
Mon 152090 rename reverse connection to reversed grpc streaming (#1843)
Browse files Browse the repository at this point in the history
* rename reverse_connection to reversed_grpc_streaming

* upgrade vcpkg
  • Loading branch information
jean-christophe81 authored Nov 27, 2024
1 parent 61ae9a0 commit 108bfa7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions agent/src/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const std::string_view config::config_schema(R"(
"minLength": 5
},
"endpoint": {
"description": "Endpoint where agent has to connect to on the poller side or listening endpoint on the agent side in case of reverse_connection",
"description": "Endpoint where agent has to connect to on the poller side or listening endpoint on the agent side in case of reversed_grpc_streaming",
"type": "string",
"pattern": "[\\w\\.:]+:\\w+"
},
Expand All @@ -61,7 +61,7 @@ const std::string_view config::config_schema(R"(
"description": "Name of the SSL certification authority",
"type": "string"
},
"reverse_connection": {
"reversed_grpc_streaming": {
"description": "Set to true to make Engine connect to the agent. Requires the agent to be configured as a server. Default: false",
"type": "boolean"
},
Expand Down Expand Up @@ -144,5 +144,5 @@ config::config(const std::string& path) {
if (_host.empty()) {
_host = boost::asio::ip::host_name();
}
_reverse_connection = json_config.get_bool("reverse_connection", false);
_reverse_connection = json_config.get_bool("reversed_grpc_streaming", false);
}
2 changes: 1 addition & 1 deletion agent/src/config_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ config::config(const std::string& registry_key) {
if (_host.empty()) {
_host = boost::asio::ip::host_name();
}
_reverse_connection = get_bool("reverse_connection");
_reverse_connection = get_bool("reversed_grpc_streaming");

RegCloseKey(h_key);
}
2 changes: 1 addition & 1 deletion common/process/inc/com/centreon/common/process/process.hh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class mutex<false> {};
template <>
class lock<false> {
public:
lock(mutex<false>* dummy_mut) {}
lock(mutex<false>* /* dummy_mut*/) {}
};

} // namespace detail
Expand Down
10 changes: 5 additions & 5 deletions common/process/src/process.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ struct boost_process {
boost_process(asio::io_context& io_context,
const std::string& exe_path,
const std::vector<std::string>& args,
bool no_stdin)
bool no_stdin [[maybe_unused]])
: stdout_pipe(io_context),
stderr_pipe(io_context),
stdin_pipe(io_context),
Expand Down Expand Up @@ -277,9 +277,9 @@ void process<use_mutex>::stdin_write_no_lock(
try {
_write_pending = true;
_proc->stdin_pipe.async_write_some(
asio::buffer(*data),
[me = shared_from_this(), caller = _proc, data](
const boost::system::error_code& err, size_t nb_written) {
asio::buffer(*data), [me = shared_from_this(), caller = _proc, data](
const boost::system::error_code& err,
size_t nb_written [[maybe_unused]]) {
detail::lock<use_mutex> l(&me->_protect);
if (caller != me->_proc) {
return;
Expand Down Expand Up @@ -438,4 +438,4 @@ template class process<true>;

template class process<false>;

} // namespace com::centreon::common
} // namespace com::centreon::common
2 changes: 1 addition & 1 deletion tests/resources/Agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def ctn_config_reverse_centreon_agent(key_path:str = None, cert_path:str = None,
makedirs(CONF_DIR, mode=0o777, exist_ok=True)
with open(f"{CONF_DIR}/centagent.json", "w") as ff:
ff.write(agent_config)
ff.write(",\n \"reverse_connection\":true")
ff.write(",\n \"reversed_grpc_streaming\":true")
if key_path is not None or cert_path is not None or ca_path is not None:
ff.write(",\n \"encryption\":true")
if key_path is not None:
Expand Down

0 comments on commit 108bfa7

Please sign in to comment.