mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
Add sync protocol interfaces
This commit is contained in:
parent
b10d72a092
commit
51ac955f1c
9 changed files with 1627 additions and 45 deletions
File diff suppressed because it is too large
Load diff
|
@ -74,4 +74,37 @@ message LogWatchEvent {
|
|||
|
||||
message Err {
|
||||
ErrCodes error = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// LogSyncContentValue provides different types for log sync
|
||||
message LogSyncContentValue {
|
||||
oneof value {
|
||||
LogHeadUpdate headUpdate = 1;
|
||||
LogFullSyncRequest fullSyncRequest = 2;
|
||||
LogFullSyncResponse fullSyncResponse = 3;
|
||||
}
|
||||
}
|
||||
|
||||
// LogSyncMessage is a message sent when we are syncing logs
|
||||
message LogSyncMessage {
|
||||
string id = 1;
|
||||
string payload = 2;
|
||||
LogSyncContentValue content = 3;
|
||||
}
|
||||
|
||||
// LogHeadUpdate is a message sent on consensus log head update
|
||||
message LogHeadUpdate {
|
||||
string head = 1;
|
||||
repeated RawRecordWithId records = 2;
|
||||
}
|
||||
|
||||
// LogFullSyncRequest is a message sent when consensus log needs full sync
|
||||
message LogFullSyncRequest {
|
||||
string head = 1;
|
||||
}
|
||||
|
||||
// LogFullSyncResponse is a message sent as a response for a specific full sync
|
||||
message LogFullSyncResponse {
|
||||
string head = 1;
|
||||
repeated RawRecordWithId records = 2;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue