File tree Expand file tree Collapse file tree 3 files changed +3
-27
lines changed Expand file tree Collapse file tree 3 files changed +3
-27
lines changed Original file line number Diff line number Diff line change 4
4
#include " internalapi/sensor/collector_iservice.pb.h"
5
5
6
6
#include " GRPCUtil.h"
7
+ #include " HostInfo.h"
7
8
8
9
namespace collector {
9
10
@@ -97,7 +98,7 @@ void CollectorOutput::Register() {
97
98
sensor::MsgFromCollector msg;
98
99
msg.clear_info ();
99
100
msg.clear_process_signal ();
100
- msg.mutable_register_ ()->set_hostname (GetHostname ());
101
+ msg.mutable_register_ ()->set_hostname (HostInfo:: GetHostname ());
101
102
102
103
for (const auto & client : sensor_clients_) {
103
104
auto res = client->SendMsg (msg);
Original file line number Diff line number Diff line change 33
33
34
34
namespace collector ::system_inspector {
35
35
36
- Service::Service () = default ;
37
36
Service::~Service () = default ;
38
- Service& Service::operator =(Service&& other) noexcept {
39
- {
40
- auto other_sinsp_lock = std::lock_guard<std::mutex>(other.libsinsp_mutex_ );
41
- auto this_sinsp_lock = std::lock_guard<std::mutex>(libsinsp_mutex_);
42
-
43
- inspector_.swap (other.inspector_ );
44
- container_metadata_inspector_.swap (other.container_metadata_inspector_ );
45
- default_formatter_.swap (other.default_formatter_ );
46
- }
47
-
48
- signal_handlers_.swap (other.signal_handlers_ );
49
-
50
- userspace_stats_ = other.userspace_stats_ ;
51
- global_event_filter_ = other.global_event_filter_ ;
52
-
53
- {
54
- auto other_running_lock = std::lock_guard<std::mutex>(other.running_mutex_ );
55
- auto this_running_lock = std::lock_guard<std::mutex>(running_mutex_);
56
- std::swap (running_, other.running_ );
57
- }
58
-
59
- return *this ;
60
- }
61
37
62
38
Service::Service (const CollectorConfig& config, CollectorOutput* client)
63
39
: inspector_(std::make_unique<sinsp>(true )),
Original file line number Diff line number Diff line change @@ -24,11 +24,10 @@ namespace collector::system_inspector {
24
24
25
25
class Service : public SystemInspector {
26
26
public:
27
- Service ();
28
27
Service (const Service&) = delete ;
29
28
Service (Service&&) = delete ;
30
29
Service& operator =(const Service&) = delete ;
31
- Service& operator =(Service&&) noexcept ;
30
+ Service& operator =(Service&&) = delete ;
32
31
~Service () override ;
33
32
34
33
Service (const CollectorConfig& config, CollectorOutput* client);
You can’t perform that action at this time.
0 commit comments