Goddess of Justice DB, the database used for storage on IzaroDFS
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

34 lines
781 B

#pragma once
#include "endian.hpp"
#include "database.hpp"
enum class db_op : uint32_t {
version = 0,
read = 1,
write = 2,
remove = 3,
stats = 4
};
struct [[gnu::packed]] received_data {
bitops::regulated<db_op> op = db_op::version;
bitops::regulated<uint64_t> rep_id = 0;
record_identifier identifier = record_identifier{};
db_page page = {0};
};
struct [[gnu::packed]] sending_data {
bitops::regulated<uint64_t> rep_id = 0;
record identifier = record{};
db_page page = {0};
};
struct [[gnu::packed]] stats_data {
bitops::regulated<uint64_t> free;
bitops::regulated<uint64_t> free_deleted;
bitops::regulated<uint64_t> total_pages;
bitops::regulated<uint64_t> total_records;
bitops::regulated<uint64_t> total_delete;
bitops::regulated<uint64_t> cow_full;
};