-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
31 lines (30 loc) · 967 Bytes
/
config.py
File metadata and controls
31 lines (30 loc) · 967 Bytes
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
class Message():
mtype = None
request_id = None
client_id = None
client_request_id = None
sender_id = None
value = None
received_propose_list = None
IAmYourLeader = 0 # Sender_id
YouAreMyLeader = 1 # previous Sender_id, value
ProposeValue = 2 # Sender_id value
AcceptValue = 3 # value
TimeOut = 4
Request = 5 # value
Logged = 6
Save = 7
Get = 8
Delete = 9
AddShard = 10
def __init__(self, mtype = None, request_id = None, client_id = None, \
client_request_id = None, sender_id = None, value = None, received_propose_list = None , command = None , key = None):
self.mtype = mtype
self.request_id = request_id
self.client_request_id = client_request_id
self.client_id = client_id
self.sender_id = sender_id
self.value = value
self.received_propose_list = received_propose_list
self.command = command
self.key = key