Skip to content

Commit

Permalink
refactor: move async key value source into libsinsp
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Dellaluce <[email protected]>
  • Loading branch information
jasondellaluce authored and poiana committed Mar 11, 2022
1 parent c4370e7 commit 9768501
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ limitations under the License.
#include <unordered_map>
#include <stdint.h>

namespace sysdig
namespace libsinsp
{

/**
Expand Down Expand Up @@ -338,6 +338,6 @@ class async_key_value_source
};


} // end namespace sysdig
} // end namespace libsinsp

#include "async_key_value_source.tpp"
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ limitations under the License.
#include <utility>
#include <vector>

namespace sysdig
namespace libsinsp
{

template<typename key_type, typename value_type>
Expand Down Expand Up @@ -382,5 +382,5 @@ std::chrono::steady_clock::time_point async_key_value_source<key_type, value_typ
return next_request.first;
}

} // end namespace sysdig
} // end namespace libsinsp

2 changes: 1 addition & 1 deletion userspace/libsinsp/cgroup_limits.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <string>
#include <utility>
#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)
Expand Down
2 changes: 1 addition & 1 deletion userspace/libsinsp/container_engine/cri.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
{
Expand Down
4 changes: 2 additions & 2 deletions userspace/libsinsp/container_engine/docker/async_source.h
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -11,7 +11,7 @@ namespace container_engine {

class container_cache_interface;

class docker_async_source : public sysdig::async_key_value_source<docker_lookup_request, sinsp_container_info>
class docker_async_source : public libsinsp::async_key_value_source<docker_lookup_request, sinsp_container_info>
{
public:
docker_async_source(uint64_t max_wait_ms, uint64_t ttl_ms, container_cache_interface *cache);
Expand Down

0 comments on commit 9768501

Please sign in to comment.