summaryrefslogtreecommitdiffstats
path: root/src/mgr/MgrSession.h
blob: c921ca09ead2f298a6c5b88cddd5720a0a0f1d08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab

#ifndef CEPH_MGR_MGRSESSION_H
#define CEPH_MGR_MGRSESSION_H

#include "common/RefCountedObj.h"
#include "common/entity_name.h"
#include "msg/msg_types.h"
#include "mon/MonCap.h"


/**
 * Session state associated with the Connection.
 */
struct MgrSession : public RefCountedObject {
  uint64_t global_id = 0;
  EntityName entity_name;
  entity_inst_t inst;

  int osd_id = -1;  ///< osd id (if an osd)

  // mon caps are suitably generic for mgr
  MonCap caps;

  std::set<std::string> declared_types;

  explicit MgrSession(CephContext *cct) : RefCountedObject(cct, 0) {}
  ~MgrSession() override {}
};

typedef boost::intrusive_ptr<MgrSession> MgrSessionRef;


#endif