-
Notifications
You must be signed in to change notification settings - Fork 3
/
types.hpp
45 lines (37 loc) · 1.03 KB
/
types.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#pragma once
#ifndef __FL_NOMOS_TYPES_HPP
#define __FL_NOMOS_TYPES_HPP
///////////////////////////////////////////////////////////////////////////////
//
// Copyright Denys Misko <gdraal@gmail.com>, Final Level, 2014.
// Distributed under BSD (3-Clause) License (See
// accompanying file LICENSE)
//
// Description: Nomos server's iteranl types definition
///////////////////////////////////////////////////////////////////////////////
#include <cstdint>
#include <string>
#include <vector>
#include <memory>
#include "socket.hpp"
namespace fl {
namespace nomos {
enum EKeyType : uint8_t
{
KEY_STRING,
KEY_INT32,
KEY_INT64,
KEY_MAX_TYPE = KEY_INT64 // should always be equal max key type
};
typedef uint32_t TServerID;
struct Server
{
fl::network::TIPv4 ip;
uint32_t port;
};
typedef std::vector<Server> TServerList;
typedef uint32_t TReplicationLogNumber;
typedef std::shared_ptr<class TopLevelIndex> TTopLevelIndexPtr;
};
};
#endif // __FL_NOMOS_TYPES_HPP