]>
git.proxmox.com Git - ceph.git/blob - ceph/src/messages/MMonMgrReport.h
bf91519eb5c2e8f23b4efc2e41e4be73baf90b9e
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 * Ceph - scalable distributed file system
6 * Copyright (C) 2017 Greg Farnum/Red Hat <gfarnum@redhat.com>
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
15 #ifndef CEPH_MMONMGRREPORT_H
16 #define CEPH_MMONMGRREPORT_H
18 #include "messages/PaxosServiceMessage.h"
19 #include "include/types.h"
22 static inline void encode(health_status_t hs
, bufferlist
& bl
) {
26 static inline void decode(health_status_t
& hs
, bufferlist::iterator
& p
) {
29 hs
= health_status_t(v
);
32 class MMonMgrReport
: public PaxosServiceMessage
{
34 static const int HEAD_VERSION
= 1;
35 static const int COMPAT_VERSION
= 1;
38 // PGMapDigest is in data payload
39 list
<pair
<health_status_t
,std::string
>> health_summary
, health_detail
;
42 : PaxosServiceMessage(MSG_MON_MGR_REPORT
, 0, HEAD_VERSION
, COMPAT_VERSION
)
45 ~MMonMgrReport() override
{}
48 const char *get_type_name() const override
{ return "monmgrreport"; }
50 void print(ostream
& out
) const override
{
51 out
<< get_type_name();
54 void encode_payload(uint64_t features
) override
{
56 ::encode(health_summary
, payload
);
57 ::encode(health_detail
, payload
);
59 void decode_payload() override
{
60 bufferlist::iterator p
= payload
.begin();
62 ::decode(health_summary
, p
);
63 ::decode(health_detail
, p
);