]>
git.proxmox.com Git - ceph.git/blob - ceph/src/messages/MMonHealth.h
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) 2012 Inktank, Inc.
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.
14 #ifndef CEPH_MMON_HEALTH_H
15 #define CEPH_MMON_HEALTH_H
17 #include "msg/Message.h"
18 #include "messages/MMonQuorumService.h"
19 #include "mon/mon_types.h"
21 class MMonHealth
: public MMonQuorumService
{
23 static constexpr int HEAD_VERSION
= 1;
28 // service specific data
31 MMonHealth() : MMonQuorumService
{MSG_MON_HEALTH
, HEAD_VERSION
} { }
34 ~MMonHealth() override
{ }
37 std::string_view
get_type_name() const override
{ return "mon_health"; }
38 void print(ostream
&o
) const override
{
40 << " e " << get_epoch()
41 << " r " << get_round()
45 void decode_payload() override
{
46 auto p
= payload
.cbegin();
48 decode(service_type
, p
);
49 decode(service_op
, p
);
50 decode(data_stats
, p
);
53 void encode_payload(uint64_t features
) override
{
56 encode(service_type
, payload
);
57 encode(service_op
, payload
);
58 encode(data_stats
, payload
);
62 #endif /* CEPH_MMON_HEALTH_H */