]>
git.proxmox.com Git - ceph.git/blob - ceph/src/messages/MMgrClose.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
6 #include "msg/Message.h"
8 class MMgrClose
: public Message
{
11 static constexpr int HEAD_VERSION
= 1;
12 static constexpr int COMPAT_VERSION
= 1;
15 std::string daemon_name
;
16 std::string service_name
; // optional; otherwise infer from entity type
18 void decode_payload() override
21 auto p
= payload
.cbegin();
22 decode(daemon_name
, p
);
23 decode(service_name
, p
);
26 void encode_payload(uint64_t features
) override
{
28 encode(daemon_name
, payload
);
29 encode(service_name
, payload
);
32 std::string_view
get_type_name() const override
{ return "mgrclose"; }
33 void print(std::ostream
& out
) const override
{
34 out
<< get_type_name() << "(";
35 if (service_name
.length()) {
38 out
<< ceph_entity_type_name(get_source().type());
40 out
<< "." << daemon_name
;
45 : Message
{MSG_MGR_CLOSE
, HEAD_VERSION
, COMPAT_VERSION
}
49 template<class T
, typename
... Args
>
50 friend boost::intrusive_ptr
<T
> ceph::make_message(Args
&&... args
);