Goddess of Justice DB, the database used for storage on IzaroDFS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
505 B

5 years ago
  1. #pragma once
  2. #include "endian.hpp"
  3. #include "database.hpp"
  4. enum class db_op : uint32_t {
  5. version = 0,
  6. read = 1,
  7. write = 2,
  8. remove = 3
  9. };
  10. struct [[gnu::packed]] received_data {
  11. bitops::regulated<db_op> op = db_op::version;
  12. bitops::regulated<uint64_t> rep_id = 0;
  13. record_identifier identifier = record_identifier{};
  14. db_page page = {0};
  15. };
  16. struct [[gnu::packed]] sending_data {
  17. bitops::regulated<uint64_t> rep_id = 0;
  18. record_identifier identifier = record_identifier{};
  19. db_page page = {0};
  20. };