forked from OpenAtomFoundation/pika
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add protobuf submodule and pika_inner_message.proto (OpenAtomFoundati…
- Loading branch information
Showing
5 changed files
with
91 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ | |
*.lo | ||
*.o | ||
*.obj | ||
*pb.cc | ||
*pb.h | ||
|
||
# Precompiled Headers | ||
*.gch | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package InnerMessage; | ||
|
||
enum Type { | ||
kSyncMeta = 1; | ||
kTrySync = 2; | ||
} | ||
|
||
enum StatusCode { | ||
kOk = 1; | ||
kWait = 2; | ||
kError = 3; | ||
} | ||
|
||
message SyncOffset { | ||
required int32 filenum = 1; | ||
required int64 offset = 2; | ||
optional bool force = 3; | ||
} | ||
|
||
message Node { | ||
required string ip = 1; | ||
required int32 port = 2; | ||
} | ||
|
||
message Table { | ||
required string table_name = 1; | ||
required int32 partition_num = 2; | ||
} | ||
|
||
message InnerRequst { | ||
message SyncMeta { | ||
required Node node = 1; | ||
} | ||
|
||
message TrySync { | ||
required Node node = 1; | ||
required string table_name = 2; | ||
required int32 partition_id = 3; | ||
required SyncOffset sync_offset = 4; | ||
} | ||
|
||
required Type type = 1; | ||
optional SyncMeta sync_meta = 2; | ||
optional TrySync try_sync = 3; | ||
} | ||
|
||
message InnerResponse { | ||
message SyncMeta { | ||
repeated Table tables = 1; | ||
} | ||
|
||
message TrySync { | ||
required StatusCode code = 1; | ||
optional string reply = 2; | ||
} | ||
|
||
required Type type = 1; | ||
optional SyncMeta sync_meta = 2; | ||
optional TrySync try_sync = 3; | ||
} |