summaryrefslogtreecommitdiffstats
path: root/src/mgr/MgrSession.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
commit483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch)
treee5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/mgr/MgrSession.h
parentInitial commit. (diff)
downloadceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.tar.xz
ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.zip
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/mgr/MgrSession.h')
-rw-r--r--src/mgr/MgrSession.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/mgr/MgrSession.h b/src/mgr/MgrSession.h
new file mode 100644
index 00000000..f5ad9338
--- /dev/null
+++ b/src/mgr/MgrSession.h
@@ -0,0 +1,38 @@
+// -*- 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 "MgrCap.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)
+
+ MgrCap caps;
+
+ std::set<std::string> declared_types;
+
+ explicit MgrSession(CephContext *cct) : RefCountedObject(cct, 0) {}
+ ~MgrSession() override {}
+
+ const entity_addr_t& get_peer_addr() const {
+ return inst.addr;
+ }
+};
+
+typedef boost::intrusive_ptr<MgrSession> MgrSessionRef;
+
+
+#endif