forked from lni/dragonboat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
226 lines (195 loc) · 4.87 KB
/
types.go
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: raft.proto
package raftpb
type MessageType int32
const (
LocalTick MessageType = 0
Election MessageType = 1
LeaderHeartbeat MessageType = 2
ConfigChangeEvent MessageType = 3
NoOP MessageType = 4
Ping MessageType = 5
Pong MessageType = 6
Propose MessageType = 7
SnapshotStatus MessageType = 8
Unreachable MessageType = 9
CheckQuorum MessageType = 10
BatchedReadIndex MessageType = 11
Replicate MessageType = 12
ReplicateResp MessageType = 13
RequestVote MessageType = 14
RequestVoteResp MessageType = 15
InstallSnapshot MessageType = 16
Heartbeat MessageType = 17
HeartbeatResp MessageType = 18
ReadIndex MessageType = 19
ReadIndexResp MessageType = 20
Quiesce MessageType = 21
SnapshotReceived MessageType = 22
LeaderTransfer MessageType = 23
TimeoutNow MessageType = 24
RateLimit MessageType = 25
RequestPreVote MessageType = 26
RequestPreVoteResp MessageType = 27
)
var MessageType_name = map[int32]string{
0: "LocalTick",
1: "Election",
2: "LeaderHeartbeat",
3: "ConfigChangeEvent",
4: "NoOP",
5: "Ping",
6: "Pong",
7: "Propose",
8: "SnapshotStatus",
9: "Unreachable",
10: "CheckQuorum",
11: "BatchedReadIndex",
12: "Replicate",
13: "ReplicateResp",
14: "RequestVote",
15: "RequestVoteResp",
16: "InstallSnapshot",
17: "Heartbeat",
18: "HeartbeatResp",
19: "ReadIndex",
20: "ReadIndexResp",
21: "Quiesce",
22: "SnapshotReceived",
23: "LeaderTransfer",
24: "TimeoutNow",
25: "RateLimit",
26: "RequestPreVote",
27: "RequestPreVoteResp",
}
var MessageType_value = map[string]int32{
"LocalTick": 0,
"Election": 1,
"LeaderHeartbeat": 2,
"ConfigChangeEvent": 3,
"NoOP": 4,
"Ping": 5,
"Pong": 6,
"Propose": 7,
"SnapshotStatus": 8,
"Unreachable": 9,
"CheckQuorum": 10,
"BatchedReadIndex": 11,
"Replicate": 12,
"ReplicateResp": 13,
"RequestVote": 14,
"RequestVoteResp": 15,
"InstallSnapshot": 16,
"Heartbeat": 17,
"HeartbeatResp": 18,
"ReadIndex": 19,
"ReadIndexResp": 20,
"Quiesce": 21,
"SnapshotReceived": 22,
"LeaderTransfer": 23,
"TimeoutNow": 24,
"RateLimit": 25,
"RequestPreVote": 26,
"RequestPreVoteResp": 27,
}
func (x MessageType) String() string {
return MessageType_name[int32(x)]
}
type EntryType int32
const (
ApplicationEntry EntryType = 0
ConfigChangeEntry EntryType = 1
EncodedEntry EntryType = 2
MetadataEntry EntryType = 3
)
var EntryType_name = map[int32]string{
0: "ApplicationEntry",
1: "ConfigChangeEntry",
2: "EncodedEntry",
3: "MetadataEntry",
}
var EntryType_value = map[string]int32{
"ApplicationEntry": 0,
"ConfigChangeEntry": 1,
"EncodedEntry": 2,
"MetadataEntry": 3,
}
func (x EntryType) String() string {
return EntryType_name[int32(x)]
}
type ConfigChangeType int32
const (
AddNode ConfigChangeType = 0
RemoveNode ConfigChangeType = 1
AddNonVoting ConfigChangeType = 2
AddWitness ConfigChangeType = 3
)
var ConfigChangeType_name = map[int32]string{
0: "AddNode",
1: "RemoveNode",
2: "AddNonVoting",
3: "AddWitness",
}
var ConfigChangeType_value = map[string]int32{
"AddNode": 0,
"RemoveNode": 1,
"AddNonVoting": 2,
"AddWitness": 3,
}
func (x ConfigChangeType) String() string {
return ConfigChangeType_name[int32(x)]
}
type StateMachineType int32
const (
UnknownStateMachine StateMachineType = 0
RegularStateMachine StateMachineType = 1
ConcurrentStateMachine StateMachineType = 2
OnDiskStateMachine StateMachineType = 3
)
var StateMachineType_name = map[int32]string{
0: "UnknownStateMachine",
1: "RegularStateMachine",
2: "ConcurrentStateMachine",
3: "OnDiskStateMachine",
}
var StateMachineType_value = map[string]int32{
"UnknownStateMachine": 0,
"RegularStateMachine": 1,
"ConcurrentStateMachine": 2,
"OnDiskStateMachine": 3,
}
func (x StateMachineType) String() string {
return StateMachineType_name[int32(x)]
}
type CompressionType int32
const (
NoCompression CompressionType = 0
Snappy CompressionType = 1
)
var CompressionType_name = map[int32]string{
0: "NoCompression",
1: "Snappy",
}
var CompressionType_value = map[string]int32{
"NoCompression": 0,
"Snappy": 1,
}
func (x CompressionType) String() string {
return CompressionType_name[int32(x)]
}
type ChecksumType int32
const (
CRC32IEEE ChecksumType = 0
HIGHWAY ChecksumType = 1
)
var ChecksumType_name = map[int32]string{
0: "CRC32IEEE",
1: "HIGHWAY",
}
var ChecksumType_value = map[string]int32{
"CRC32IEEE": 0,
"HIGHWAY": 1,
}
func (x ChecksumType) String() string {
return ChecksumType_name[int32(x)]
}