]> git.proxmox.com Git - ceph.git/blob - ceph/src/messages/MMgrConfigure.h
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / messages / MMgrConfigure.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3 /*
4 * Ceph - scalable distributed file system
5 *
6 * Copyright (C) 2016 John Spray <john.spray@redhat.com>
7 *
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.
12 */
13
14
15 #ifndef CEPH_MMGRCONFIGURE_H_
16 #define CEPH_MMGRCONFIGURE_H_
17
18 #include "msg/Message.h"
19
20 /**
21 * This message is sent from ceph-mgr to MgrClient, instructing it
22 * it about what data to send back to ceph-mgr at what frequency.
23 */
24 class MMgrConfigure : public Message
25 {
26 static const int HEAD_VERSION = 1;
27 static const int COMPAT_VERSION = 1;
28
29 public:
30 uint32_t stats_period;
31
32 void decode_payload() override
33 {
34 bufferlist::iterator p = payload.begin();
35 ::decode(stats_period, p);
36 }
37
38 void encode_payload(uint64_t features) override {
39 ::encode(stats_period, payload);
40 }
41
42 const char *get_type_name() const override { return "mgrconfigure"; }
43 void print(ostream& out) const override {
44 out << get_type_name() << "()";
45 }
46
47 MMgrConfigure()
48 : Message(MSG_MGR_CONFIGURE, HEAD_VERSION, COMPAT_VERSION)
49 {}
50 };
51
52 #endif
53