Starting on one-way sync
This commit is contained in:
43
sync_proto.binc
Normal file
43
sync_proto.binc
Normal file
@ -0,0 +1,43 @@
|
||||
type SyncInitRequest {
|
||||
clientCommit: string = 0;
|
||||
}
|
||||
|
||||
type SyncInitResponse {
|
||||
remoteCommit: string = 0;
|
||||
needPull : boolean = 1;
|
||||
needPush : boolean = 2;
|
||||
}
|
||||
|
||||
type Commit {
|
||||
id : string = 0;
|
||||
root : string = 1;
|
||||
before: string = 2;
|
||||
merge : string = 3;
|
||||
date : uint64 = 4;
|
||||
}
|
||||
|
||||
|
||||
type PullGetLogRequest {
|
||||
limit: uint32 = 0;
|
||||
start: string = 1;
|
||||
}
|
||||
|
||||
type PullGetLogResponse {
|
||||
commits: Commit[] = 0;
|
||||
}
|
||||
|
||||
type PullObjectRequest {
|
||||
id : string = 0;
|
||||
type: string = 1;
|
||||
}
|
||||
|
||||
type PullObjectResponse {
|
||||
found: boolean = 0;
|
||||
data : bytes = 1;
|
||||
}
|
||||
|
||||
service Sync {
|
||||
SyncInit(SyncInitRequest): SyncInitResponse;
|
||||
PullGetLog(PullGetLogRequest): PullGetLogResponse;
|
||||
PullObject(PullObjectRequest): PullObjectResponse;
|
||||
}
|
Reference in New Issue
Block a user