File tree Expand file tree Collapse file tree 4 files changed +49
-14
lines changed
include/cyberprobe/analyser Expand file tree Collapse file tree 4 files changed +49
-14
lines changed Original file line number Diff line number Diff line change
1
+
2
+ // //////////////////////////////////////////////////////////////////////////
3
+ //
4
+ // gRPC stuff
5
+ //
6
+ // //////////////////////////////////////////////////////////////////////////
7
+
8
+ #ifndef CYBERPROBE_ANALYSER_GRPC_H
9
+ #define CYBERPROBE_ANALYSER_GRPC_H
10
+
11
+ #ifdef HAVE_CONFIG_H
12
+ #include < config.h>
13
+ #endif
14
+
15
+ #include < memory>
16
+ #include < string>
17
+ #include < cyberprobe/event/event.h>
18
+
19
+ namespace cyberprobe {
20
+
21
+ namespace analyser {
22
+
23
+ #ifdef WITH_GRPC
24
+
25
+ class eventstream_client ;
26
+
27
+ class grpc_manager {
28
+ public:
29
+ grpc_manager () {}
30
+ std::map<std::string, std::shared_ptr<eventstream_client> > client;
31
+ static std::shared_ptr<grpc_manager> create ();
32
+ void observe (std::shared_ptr<event::event>, const std::string& svc);
33
+ void close ();
34
+ virtual ~grpc_manager ();
35
+ };
36
+
37
+ #endif
38
+
39
+ }
40
+
41
+ }
42
+
43
+ #endif
Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ extern "C" {
32
32
#include < cyberprobe/protocol/tls_handshake_protocol.h>
33
33
#include < cyberprobe/event/event.h>
34
34
35
+ #ifdef WITH_GRPC
36
+ #include < cyberprobe/analyser/grpc.h>
37
+ #endif
38
+
35
39
namespace cyberprobe {
36
40
37
41
namespace analyser {
@@ -442,18 +446,6 @@ delete[] buf;
442
446
443
447
#ifdef WITH_GRPC
444
448
445
- class eventstream_client ;
446
-
447
- class grpc_manager {
448
- public:
449
- grpc_manager () {}
450
- std::map<std::string, std::shared_ptr<eventstream_client> > client;
451
- static std::shared_ptr<grpc_manager> create ();
452
- void observe (std::shared_ptr<event::event>, const std::string& svc);
453
- void close ();
454
- virtual ~grpc_manager ();
455
- };
456
-
457
449
class grpc_userdata {
458
450
public:
459
451
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ endif
179
179
if WITH_PROTOBUF
180
180
if WITH_GRPC
181
181
182
- libcybermon_la_SOURCES += event/event_grpc .C
182
+ libcybermon_la_SOURCES += analyser/grpc .C
183
183
184
184
eventstream_service_SOURCES = eventstream-service.C network/socket.C \
185
185
../include/cyberprobe/network/socket.h
Original file line number Diff line number Diff line change 9
9
#include <thread>
10
10
11
11
#include <cyberprobe/event/event.h>
12
- #include <cyberprobe/analyser/lua .h>
12
+ #include <cyberprobe/analyser/grpc .h>
13
13
14
14
#include <grpc/grpc.h>
15
15
#include <grpcpp/channel.h>
You can’t perform that action at this time.
0 commit comments