From 9768501685867b2701ea196eb52a8ace9be3d3e1 Mon Sep 17 00:00:00 2001 From: Jason Dellaluce Date: Thu, 10 Mar 2022 14:26:44 +0000 Subject: [PATCH] refactor: move async key value source into libsinsp Signed-off-by: Jason Dellaluce --- userspace/{ => libsinsp}/async/async_key_value_source.h | 4 ++-- userspace/{ => libsinsp}/async/async_key_value_source.tpp | 4 ++-- userspace/libsinsp/cgroup_limits.h | 2 +- userspace/libsinsp/container_engine/cri.h | 2 +- userspace/libsinsp/container_engine/docker/async_source.h | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) rename userspace/{ => libsinsp}/async/async_key_value_source.h (99%) rename userspace/{ => libsinsp}/async/async_key_value_source.tpp (99%) diff --git a/userspace/async/async_key_value_source.h b/userspace/libsinsp/async/async_key_value_source.h similarity index 99% rename from userspace/async/async_key_value_source.h rename to userspace/libsinsp/async/async_key_value_source.h index 0dba7fe9f4..7cb9f78fb8 100644 --- a/userspace/async/async_key_value_source.h +++ b/userspace/libsinsp/async/async_key_value_source.h @@ -27,7 +27,7 @@ limitations under the License. #include #include -namespace sysdig +namespace libsinsp { /** @@ -338,6 +338,6 @@ class async_key_value_source }; -} // end namespace sysdig +} // end namespace libsinsp #include "async_key_value_source.tpp" diff --git a/userspace/async/async_key_value_source.tpp b/userspace/libsinsp/async/async_key_value_source.tpp similarity index 99% rename from userspace/async/async_key_value_source.tpp rename to userspace/libsinsp/async/async_key_value_source.tpp index f13d47ef87..c4aff61644 100644 --- a/userspace/async/async_key_value_source.tpp +++ b/userspace/libsinsp/async/async_key_value_source.tpp @@ -25,7 +25,7 @@ limitations under the License. #include #include -namespace sysdig +namespace libsinsp { template @@ -382,5 +382,5 @@ std::chrono::steady_clock::time_point async_key_value_source #include -#include "async_key_value_source.h" +#include "async/async_key_value_source.h" namespace { bool less_than(const std::string& lhs, const std::string& rhs, bool if_equal=false) diff --git a/userspace/libsinsp/container_engine/cri.h b/userspace/libsinsp/container_engine/cri.h index 677b218001..c1438b811c 100644 --- a/userspace/libsinsp/container_engine/cri.h +++ b/userspace/libsinsp/container_engine/cri.h @@ -46,7 +46,7 @@ namespace container_engine { * 2. Apparently CRI can fail to find a freshly created container * for a short while, so we should delay the query a bit. */ -class cri_async_source : public sysdig::async_key_value_source< +class cri_async_source : public libsinsp::async_key_value_source< libsinsp::cgroup_limits::cgroup_limits_key, sinsp_container_info> { diff --git a/userspace/libsinsp/container_engine/docker/async_source.h b/userspace/libsinsp/container_engine/docker/async_source.h index 851a12db5d..0fca33d778 100644 --- a/userspace/libsinsp/container_engine/docker/async_source.h +++ b/userspace/libsinsp/container_engine/docker/async_source.h @@ -1,6 +1,6 @@ #pragma once -#include "async_key_value_source.h" +#include "async/async_key_value_source.h" #include "container_info.h" #include "container_engine/docker/connection.h" @@ -11,7 +11,7 @@ namespace container_engine { class container_cache_interface; -class docker_async_source : public sysdig::async_key_value_source +class docker_async_source : public libsinsp::async_key_value_source { public: docker_async_source(uint64_t max_wait_ms, uint64_t ttl_ms, container_cache_interface *cache);