forked from avinashnarsale/Chandy-Lamport-snapshot-algorithm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bank.proto
51 lines (40 loc) · 813 Bytes
/
bank.proto
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
46
47
48
49
50
syntax = "proto3";
message InitBranch {
uint32 balance=1;
message Branch {
string name=1;
string ip=2;
uint32 port=3;
}
repeated Branch all_branches=2;
}
message Transfer {
uint32 money = 1;
}
message InitSnapshot {
uint32 snapshot_id = 1;
}
message Marker {
uint32 snapshot_id = 1;
}
message RetrieveSnapshot {
uint32 snapshot_id = 1;
}
message ReturnSnapshot {
message LocalSnapshot{
uint32 snapshot_id=1;
uint32 balance=2;
repeated uint32 channel_state=3;
}
LocalSnapshot local_snapshot = 1;
}
message BranchMessage {
oneof branch_message {
InitBranch init_branch = 1;
Transfer transfer = 2;
InitSnapshot init_snapshot = 3;
Marker marker = 4;
RetrieveSnapshot retrieve_snapshot = 5;
ReturnSnapshot return_snapshot = 6;
}
}