OLD | NEW |
| (Empty) |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 // | |
5 // Over-the-wire message definitions used for the Helium synchronization | |
6 // protocol. | |
7 | |
8 syntax = "proto3"; | |
9 | |
10 option optimize_for = LITE_RUNTIME; | |
11 | |
12 package blimp.proto; | |
13 | |
14 // Vector clock that is used to get the partial order of changes. | |
15 // This class is the proto definition of | |
16 // //blimp/net/helium/version_vector.h | |
17 message VersionVectorMessage { | |
18 uint64 local_revision = 1; | |
19 uint64 remote_revision = 2; | |
20 } | |
21 | |
22 // Sample proto for test purposes. | |
23 message TestChangesetMessage { | |
24 int32 value1 = 1; | |
25 int32 value2 = 2; | |
26 } | |
27 | |
28 // A union of serializable Changeset types. There will be one for each Helium | |
29 // Object that requires serialization. | |
30 message ChangesetMessage { | |
31 oneof payload { | |
32 // Sample message for the test | |
33 TestChangesetMessage test = 1; | |
34 }; | |
35 } | |
36 | |
37 // Message that encapsulates a change for a helium object. It contains | |
38 // information required to restore the object from the time specified in |from| | |
39 // until |to|. | |
40 // | |
41 // This is the main object that will be sent in the Helium transport | |
42 message HeliumMessage { | |
43 // Routing: Identifies the object to which this message applies. | |
44 uint64 object_id = 1; | |
45 | |
46 // Synchronization: Specifies a |changeset|, the sender Revision upon which | |
47 // the Changeset depends, and the sender Revision that is reached following | |
48 // application of the Changeset. Note that |changeset| may embed further | |
49 // Revision information, as necessary for the Syncable to resolve conflicts, | |
50 // though future optimizations may expose Revision information from | |
51 // HeliumMessage to the Syncable API directly, for greater efficiency, and | |
52 // convenience. | |
53 uint64 start_revision = 2; | |
54 uint64 end_revision = 3; | |
55 bytes changeset = 4; | |
56 | |
57 // Acknowledgement: Indicates the most recent recipient Revision of the object | |
58 // that the sender is currently aware of. | |
59 uint64 ack_revision = 5; | |
60 } | |
OLD | NEW |