-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchord.thrift
More file actions
40 lines (30 loc) · 815 Bytes
/
chord.thrift
File metadata and controls
40 lines (30 loc) · 815 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
31
32
33
34
35
36
37
38
39
40
exception SystemException {
1: optional string message
}
struct RFileMetadata {
1: optional string filename;
2: optional i32 version;
3: optional string contentHash;
}
struct RFile {
1: optional RFileMetadata meta;
2: optional string content;
}
struct NodeID {
1: string id;
2: string ip;
3: i32 port;
}
service FileStore {
void writeFile(1: RFile rFile)
throws (1: SystemException systemException),
RFile readFile(1: string filename)
throws (1: SystemException systemException),
void setFingertable(1: list<NodeID> node_list),
NodeID findSucc(1: string key)
throws (1: SystemException systemException),
NodeID findPred(1: string key)
throws (1: SystemException systemException),
NodeID getNodeSucc()
throws (1: SystemException systemException),
}