This repository has been archived by the owner on Nov 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmsg.proto
96 lines (82 loc) · 1.7 KB
/
msg.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
syntax = "proto3";
package rony;
option go_package = "github.com/ronaksoft/rony";
import "github.com/ronaksoft/rony/options.proto";
// MessageEnvelope
// This type of message will be used to contain another ProtoBuffer Message inside
message MessageEnvelope {
option (rony_skip_json) = true;
uint64 Constructor = 1 [jstype = JS_STRING];
fixed64 RequestID = 2;
bool JsonEncoded = 3;
bytes Message = 4;
bytes Auth = 8;
repeated KeyValue Header = 10;
}
message Ping {
int64 ID = 1;
}
message Pong {
int64 ID = 2;
}
// KeyValue
message KeyValue {
string Key = 1;
string Value = 2;
}
// MessageContainer
// This type of message will be used to send multi messages inside a single container message
message MessageContainer {
int32 Length = 1;
repeated MessageEnvelope Envelopes = 2;
// SyncRun makes the execution in sequence if it is TRUE
bool SyncRun = 3;
}
// Error
message Error {
string Code = 1;
string Items = 2;
string Description = 3;
}
// RedirectReason
enum RedirectReason {
ReplicaSetSession = 0;
ReplicaSetRequest = 1;
Reserved1 = 3;
Reserved2 = 4;
Reserved3 = 5;
Reserved4 = 6;
}
// Redirect
message Redirect {
RedirectReason Reason = 100;
repeated Edge Edges = 2;
uint32 WaitInSec = 3;
}
// Edge
message Edge {
uint64 ReplicaSet = 1;
string ServerID = 2;
repeated string HostPorts = 3;
}
// Edges
message Edges {
repeated Edge Nodes = 1;
}
// GetNodes
// @Function
// @Return: Edges
message GetNodes {
repeated uint64 ReplicaSet = 1;
}
// GetNodes
// @Function
// @Return: Edges
message GetAllNodes {
}
// HttpBody used by REST proxies to fill the output.
message HttpBody {
string ContentType = 1;
repeated KeyValue Header = 2;
bytes Body = 3;
}