1
0
Fork 0
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:
mcrakhman 2023-07-02 15:55:58 +02:00
parent b10d72a092
commit 51ac955f1c
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B
9 changed files with 1627 additions and 45 deletions

File diff suppressed because it is too large Load diff

View file

@ -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;
}