diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/mgr/MgrSession.h | |
parent | Initial commit. (diff) | |
download | ceph-upstream.tar.xz ceph-upstream.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/mgr/MgrSession.h')
-rw-r--r-- | src/mgr/MgrSession.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/mgr/MgrSession.h b/src/mgr/MgrSession.h new file mode 100644 index 000000000..40b50220b --- /dev/null +++ b/src/mgr/MgrSession.h @@ -0,0 +1,40 @@ +// -*- 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; + + const entity_addr_t& get_peer_addr() const { + return inst.addr; + } + +private: + FRIEND_MAKE_REF(MgrSession); + explicit MgrSession(CephContext *cct) : RefCountedObject(cct) {} + ~MgrSession() override = default; +}; + +using MgrSessionRef = ceph::ref_t<MgrSession>; + + +#endif |