-
Notifications
You must be signed in to change notification settings - Fork 0
/
p.pb.go
315 lines (276 loc) · 7.58 KB
/
p.pb.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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
// Code generated by protoc-gen-go.
// source: p.proto
// DO NOT EDIT!
/*
Package reg is a generated protocol buffer package.
It is generated from these files:
p.proto
It has these top-level messages:
XLRegMsg
*/
package reg
import proto "github.com/golang/protobuf/proto"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = math.Inf
type XLRegMsg_Tag int32
const (
XLRegMsg_RegCredRequest XLRegMsg_Tag = 1
XLRegMsg_RegCredReply XLRegMsg_Tag = 2
XLRegMsg_Member XLRegMsg_Tag = 3
XLRegMsg_MemberOK XLRegMsg_Tag = 4
// size means cluster size, constrained to 1 < n <= 64
// epCount is number of menber endPoints, which must be 1 or 2
XLRegMsg_Create XLRegMsg_Tag = 5
XLRegMsg_CreateReply XLRegMsg_Tag = 6
// Response to Join is clusterID + size + epCount -OR- error
XLRegMsg_Join XLRegMsg_Tag = 7
XLRegMsg_JoinReply XLRegMsg_Tag = 8
XLRegMsg_GetCluster XLRegMsg_Tag = 9
// Response to Get is a list of known members -OR- error
XLRegMsg_ClusterMembers XLRegMsg_Tag = 10
XLRegMsg_Bye XLRegMsg_Tag = 11
XLRegMsg_Ack XLRegMsg_Tag = 12
XLRegMsg_Error XLRegMsg_Tag = 13
)
var XLRegMsg_Tag_name = map[int32]string{
1: "RegCredRequest",
2: "RegCredReply",
3: "Member",
4: "MemberOK",
5: "Create",
6: "CreateReply",
7: "Join",
8: "JoinReply",
9: "GetCluster",
10: "ClusterMembers",
11: "Bye",
12: "Ack",
13: "Error",
}
var XLRegMsg_Tag_value = map[string]int32{
"RegCredRequest": 1,
"RegCredReply": 2,
"Member": 3,
"MemberOK": 4,
"Create": 5,
"CreateReply": 6,
"Join": 7,
"JoinReply": 8,
"GetCluster": 9,
"ClusterMembers": 10,
"Bye": 11,
"Ack": 12,
"Error": 13,
}
func (x XLRegMsg_Tag) Enum() *XLRegMsg_Tag {
p := new(XLRegMsg_Tag)
*p = x
return p
}
func (x XLRegMsg_Tag) String() string {
return proto.EnumName(XLRegMsg_Tag_name, int32(x))
}
func (x *XLRegMsg_Tag) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(XLRegMsg_Tag_value, data, "XLRegMsg_Tag")
if err != nil {
return err
}
*x = XLRegMsg_Tag(value)
return nil
}
type XLRegMsg struct {
Op *XLRegMsg_Tag `protobuf:"varint,1,opt,enum=reg.XLRegMsg_Tag" json:"Op,omitempty"`
AesKey []byte `protobuf:"bytes,3,opt" json:"AesKey,omitempty"`
Salt1 []byte `protobuf:"bytes,4,opt" json:"Salt1,omitempty"`
Salt2 []byte `protobuf:"bytes,5,opt" json:"Salt2,omitempty"`
Version *uint32 `protobuf:"varint,6,opt" json:"Version,omitempty"`
MemberName *string `protobuf:"bytes,8,opt" json:"MemberName,omitempty"`
MemberID []byte `protobuf:"bytes,9,opt" json:"MemberID,omitempty"`
MemberAttrs *uint64 `protobuf:"varint,10,opt" json:"MemberAttrs,omitempty"`
MemberSpecs *XLRegMsg_Token `protobuf:"bytes,11,opt" json:"MemberSpecs,omitempty"`
ClusterID []byte `protobuf:"bytes,13,opt" json:"ClusterID,omitempty"`
ClusterName *string `protobuf:"bytes,14,opt" json:"ClusterName,omitempty"`
ClusterMaxSize *uint32 `protobuf:"varint,15,opt" json:"ClusterMaxSize,omitempty"`
ClusterAttrs *uint64 `protobuf:"varint,16,opt" json:"ClusterAttrs,omitempty"`
EndPointCount *uint32 `protobuf:"varint,17,opt" json:"EndPointCount,omitempty"`
Which *uint64 `protobuf:"varint,20,opt" json:"Which,omitempty"`
Tokens []*XLRegMsg_Token `protobuf:"bytes,21,rep" json:"Tokens,omitempty"`
DigSig []byte `protobuf:"bytes,22,opt" json:"DigSig,omitempty"`
ErrDesc *string `protobuf:"bytes,23,opt" json:"ErrDesc,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *XLRegMsg) Reset() { *m = XLRegMsg{} }
func (m *XLRegMsg) String() string { return proto.CompactTextString(m) }
func (*XLRegMsg) ProtoMessage() {}
func (m *XLRegMsg) GetOp() XLRegMsg_Tag {
if m != nil && m.Op != nil {
return *m.Op
}
return XLRegMsg_RegCredRequest
}
func (m *XLRegMsg) GetAesKey() []byte {
if m != nil {
return m.AesKey
}
return nil
}
func (m *XLRegMsg) GetSalt1() []byte {
if m != nil {
return m.Salt1
}
return nil
}
func (m *XLRegMsg) GetSalt2() []byte {
if m != nil {
return m.Salt2
}
return nil
}
func (m *XLRegMsg) GetVersion() uint32 {
if m != nil && m.Version != nil {
return *m.Version
}
return 0
}
func (m *XLRegMsg) GetMemberName() string {
if m != nil && m.MemberName != nil {
return *m.MemberName
}
return ""
}
func (m *XLRegMsg) GetMemberID() []byte {
if m != nil {
return m.MemberID
}
return nil
}
func (m *XLRegMsg) GetMemberAttrs() uint64 {
if m != nil && m.MemberAttrs != nil {
return *m.MemberAttrs
}
return 0
}
func (m *XLRegMsg) GetMemberSpecs() *XLRegMsg_Token {
if m != nil {
return m.MemberSpecs
}
return nil
}
func (m *XLRegMsg) GetClusterID() []byte {
if m != nil {
return m.ClusterID
}
return nil
}
func (m *XLRegMsg) GetClusterName() string {
if m != nil && m.ClusterName != nil {
return *m.ClusterName
}
return ""
}
func (m *XLRegMsg) GetClusterMaxSize() uint32 {
if m != nil && m.ClusterMaxSize != nil {
return *m.ClusterMaxSize
}
return 0
}
func (m *XLRegMsg) GetClusterAttrs() uint64 {
if m != nil && m.ClusterAttrs != nil {
return *m.ClusterAttrs
}
return 0
}
func (m *XLRegMsg) GetEndPointCount() uint32 {
if m != nil && m.EndPointCount != nil {
return *m.EndPointCount
}
return 0
}
func (m *XLRegMsg) GetWhich() uint64 {
if m != nil && m.Which != nil {
return *m.Which
}
return 0
}
func (m *XLRegMsg) GetTokens() []*XLRegMsg_Token {
if m != nil {
return m.Tokens
}
return nil
}
func (m *XLRegMsg) GetDigSig() []byte {
if m != nil {
return m.DigSig
}
return nil
}
func (m *XLRegMsg) GetErrDesc() string {
if m != nil && m.ErrDesc != nil {
return *m.ErrDesc
}
return ""
}
// the Token describes a member
type XLRegMsg_Token struct {
Name *string `protobuf:"bytes,1,opt" json:"Name,omitempty"`
Attrs *uint64 `protobuf:"varint,2,opt" json:"Attrs,omitempty"`
ID []byte `protobuf:"bytes,3,opt" json:"ID,omitempty"`
CommsKey []byte `protobuf:"bytes,4,opt" json:"CommsKey,omitempty"`
SigKey []byte `protobuf:"bytes,5,opt" json:"SigKey,omitempty"`
// by convention, MyEnds[0] for inter-cluster comms,
// MyEnds[1] for cluster-client comms
// there must be epCount endPoints present
MyEnds []string `protobuf:"bytes,6,rep" json:"MyEnds,omitempty"`
DigSig []byte `protobuf:"bytes,7,opt" json:"DigSig,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *XLRegMsg_Token) Reset() { *m = XLRegMsg_Token{} }
func (m *XLRegMsg_Token) String() string { return proto.CompactTextString(m) }
func (*XLRegMsg_Token) ProtoMessage() {}
func (m *XLRegMsg_Token) GetName() string {
if m != nil && m.Name != nil {
return *m.Name
}
return ""
}
func (m *XLRegMsg_Token) GetAttrs() uint64 {
if m != nil && m.Attrs != nil {
return *m.Attrs
}
return 0
}
func (m *XLRegMsg_Token) GetID() []byte {
if m != nil {
return m.ID
}
return nil
}
func (m *XLRegMsg_Token) GetCommsKey() []byte {
if m != nil {
return m.CommsKey
}
return nil
}
func (m *XLRegMsg_Token) GetSigKey() []byte {
if m != nil {
return m.SigKey
}
return nil
}
func (m *XLRegMsg_Token) GetMyEnds() []string {
if m != nil {
return m.MyEnds
}
return nil
}
func (m *XLRegMsg_Token) GetDigSig() []byte {
if m != nil {
return m.DigSig
}
return nil
}
func init() {
proto.RegisterEnum("reg.XLRegMsg_Tag", XLRegMsg_Tag_name, XLRegMsg_Tag_value)
}