// // Created by Kirill Zhukov on 20.04.2025. // #ifndef COMMAND_H #define COMMAND_H #include #include #include "utils/hash/Hash128.h" namespace usub::core { enum class OperationType : uint8_t { PUT = 0, DELETE = 1, FIND = 2, UNKNOWN = 0xFF }; struct Command { Command(); Command(const Command& other); Command& operator=(const Command& other); void serialize(std::ostream& out) const; static Command deserialize(std::istream& in); std::atomic ready; OperationType op; utils::Hash128 key; uint32_t value_size; char value[1024]; std::atomic response_ready; uint32_t response_size; char response[1024]; }; } #endif // COMMAND_H