mirror of
https://github.com/falcosecurity/falco.git
synced 2025-06-28 23:57:29 +00:00
update(userspace/falco): move gRPC queue to proper namespace
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
This commit is contained in:
parent
9ea195a0b7
commit
6e36afdba3
@ -21,9 +21,9 @@ limitations under the License.
|
||||
|
||||
namespace falco
|
||||
{
|
||||
namespace outputs
|
||||
namespace grpc
|
||||
{
|
||||
typedef tbb::concurrent_queue<response> response_cq;
|
||||
typedef tbb::concurrent_queue<outputs::response> response_cq;
|
||||
|
||||
class queue
|
||||
{
|
||||
@ -34,12 +34,12 @@ public:
|
||||
return instance;
|
||||
}
|
||||
|
||||
bool try_pop(response& res)
|
||||
bool try_pop(outputs::response& res)
|
||||
{
|
||||
return m_queue.try_pop(res);
|
||||
}
|
||||
|
||||
void push(response& res)
|
||||
void push(outputs::response& res)
|
||||
{
|
||||
m_queue.push(res);
|
||||
}
|
||||
@ -56,5 +56,5 @@ public:
|
||||
queue(queue const&) = delete;
|
||||
void operator=(queue const&) = delete;
|
||||
};
|
||||
} // namespace outputs
|
||||
} // namespace grpc
|
||||
} // namespace falco
|
@ -16,7 +16,7 @@ limitations under the License.
|
||||
|
||||
#include "config_falco.h"
|
||||
#include "grpc_server_impl.h"
|
||||
#include "outputs_queue.h"
|
||||
#include "grpc_queue.h"
|
||||
#include "logger.h"
|
||||
#include "banned.h" // This raises a compilation error when certain functions are used
|
||||
|
||||
@ -44,7 +44,7 @@ void falco::grpc::server_impl::get(const stream_context& ctx, const outputs::req
|
||||
// m_status == stream_context::STREAMING?
|
||||
// todo(leodido) > set m_stream
|
||||
|
||||
ctx.m_has_more = outputs::queue::get().try_pop(res);
|
||||
ctx.m_has_more = queue::get().try_pop(res);
|
||||
}
|
||||
|
||||
void falco::grpc::server_impl::sub(const bidi_context& ctx, const outputs::request& req, outputs::response& res)
|
||||
@ -61,7 +61,7 @@ void falco::grpc::server_impl::sub(const bidi_context& ctx, const outputs::reque
|
||||
// m_status == stream_context::STREAMING?
|
||||
// todo(leodido) > set m_stream
|
||||
|
||||
ctx.m_has_more = outputs::queue::get().try_pop(res);
|
||||
ctx.m_has_more = queue::get().try_pop(res);
|
||||
}
|
||||
|
||||
void falco::grpc::server_impl::version(const context& ctx, const version::request&, version::response& res)
|
||||
|
@ -16,7 +16,7 @@ limitations under the License.
|
||||
|
||||
#include <google/protobuf/util/time_util.h>
|
||||
#include "outputs_grpc.h"
|
||||
#include "outputs_queue.h"
|
||||
#include "grpc_queue.h"
|
||||
#include "falco_common.h"
|
||||
#include "formats.h"
|
||||
#include "banned.h" // This raises a compilation error when certain functions are used
|
||||
@ -67,7 +67,7 @@ void falco::outputs::output_grpc::output_event(gen_event *evt, std::string &rule
|
||||
auto host = grpc_res.mutable_hostname();
|
||||
*host = m_hostname;
|
||||
|
||||
falco::outputs::queue::get().push(grpc_res);
|
||||
falco::grpc::queue::get().push(grpc_res);
|
||||
}
|
||||
|
||||
void falco::outputs::output_grpc::output_msg(falco_common::priority_type priority, std::string &msg)
|
||||
|
Loading…
Reference in New Issue
Block a user