-
Notifications
You must be signed in to change notification settings - Fork 0
/
kafka.pb.go
275 lines (244 loc) · 9.91 KB
/
kafka.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
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: orderer/kafka.proto
package orderer
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// KafkaMessage is a wrapper type for the messages
// that the Kafka-based orderer deals with.
type KafkaMessage struct {
// Types that are valid to be assigned to Type:
// *KafkaMessage_Regular
// *KafkaMessage_TimeToCut
// *KafkaMessage_Connect
Type isKafkaMessage_Type `protobuf_oneof:"Type"`
}
func (m *KafkaMessage) Reset() { *m = KafkaMessage{} }
func (m *KafkaMessage) String() string { return proto.CompactTextString(m) }
func (*KafkaMessage) ProtoMessage() {}
func (*KafkaMessage) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
type isKafkaMessage_Type interface {
isKafkaMessage_Type()
}
type KafkaMessage_Regular struct {
Regular *KafkaMessageRegular `protobuf:"bytes,1,opt,name=regular,oneof"`
}
type KafkaMessage_TimeToCut struct {
TimeToCut *KafkaMessageTimeToCut `protobuf:"bytes,2,opt,name=time_to_cut,json=timeToCut,oneof"`
}
type KafkaMessage_Connect struct {
Connect *KafkaMessageConnect `protobuf:"bytes,3,opt,name=connect,oneof"`
}
func (*KafkaMessage_Regular) isKafkaMessage_Type() {}
func (*KafkaMessage_TimeToCut) isKafkaMessage_Type() {}
func (*KafkaMessage_Connect) isKafkaMessage_Type() {}
func (m *KafkaMessage) GetType() isKafkaMessage_Type {
if m != nil {
return m.Type
}
return nil
}
func (m *KafkaMessage) GetRegular() *KafkaMessageRegular {
if x, ok := m.GetType().(*KafkaMessage_Regular); ok {
return x.Regular
}
return nil
}
func (m *KafkaMessage) GetTimeToCut() *KafkaMessageTimeToCut {
if x, ok := m.GetType().(*KafkaMessage_TimeToCut); ok {
return x.TimeToCut
}
return nil
}
func (m *KafkaMessage) GetConnect() *KafkaMessageConnect {
if x, ok := m.GetType().(*KafkaMessage_Connect); ok {
return x.Connect
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*KafkaMessage) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _KafkaMessage_OneofMarshaler, _KafkaMessage_OneofUnmarshaler, _KafkaMessage_OneofSizer, []interface{}{
(*KafkaMessage_Regular)(nil),
(*KafkaMessage_TimeToCut)(nil),
(*KafkaMessage_Connect)(nil),
}
}
func _KafkaMessage_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*KafkaMessage)
// Type
switch x := m.Type.(type) {
case *KafkaMessage_Regular:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Regular); err != nil {
return err
}
case *KafkaMessage_TimeToCut:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.TimeToCut); err != nil {
return err
}
case *KafkaMessage_Connect:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Connect); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("KafkaMessage.Type has unexpected type %T", x)
}
return nil
}
func _KafkaMessage_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*KafkaMessage)
switch tag {
case 1: // Type.regular
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(KafkaMessageRegular)
err := b.DecodeMessage(msg)
m.Type = &KafkaMessage_Regular{msg}
return true, err
case 2: // Type.time_to_cut
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(KafkaMessageTimeToCut)
err := b.DecodeMessage(msg)
m.Type = &KafkaMessage_TimeToCut{msg}
return true, err
case 3: // Type.connect
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(KafkaMessageConnect)
err := b.DecodeMessage(msg)
m.Type = &KafkaMessage_Connect{msg}
return true, err
default:
return false, nil
}
}
func _KafkaMessage_OneofSizer(msg proto.Message) (n int) {
m := msg.(*KafkaMessage)
// Type
switch x := m.Type.(type) {
case *KafkaMessage_Regular:
s := proto.Size(x.Regular)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *KafkaMessage_TimeToCut:
s := proto.Size(x.TimeToCut)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *KafkaMessage_Connect:
s := proto.Size(x.Connect)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// KafkaMessageRegular wraps a marshalled envelope.
type KafkaMessageRegular struct {
Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
}
func (m *KafkaMessageRegular) Reset() { *m = KafkaMessageRegular{} }
func (m *KafkaMessageRegular) String() string { return proto.CompactTextString(m) }
func (*KafkaMessageRegular) ProtoMessage() {}
func (*KafkaMessageRegular) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} }
func (m *KafkaMessageRegular) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
// KafkaMessageTimeToCut is used to signal to the orderers
// that it is time to cut block <block_number>.
type KafkaMessageTimeToCut struct {
BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber" json:"block_number,omitempty"`
}
func (m *KafkaMessageTimeToCut) Reset() { *m = KafkaMessageTimeToCut{} }
func (m *KafkaMessageTimeToCut) String() string { return proto.CompactTextString(m) }
func (*KafkaMessageTimeToCut) ProtoMessage() {}
func (*KafkaMessageTimeToCut) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{2} }
func (m *KafkaMessageTimeToCut) GetBlockNumber() uint64 {
if m != nil {
return m.BlockNumber
}
return 0
}
// KafkaMessageConnect is posted by an orderer upon booting up.
// It is used to prevent the panic that would be caused if we
// were to consume an empty partition. It is ignored by all
// orderers when processing the partition.
type KafkaMessageConnect struct {
Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
}
func (m *KafkaMessageConnect) Reset() { *m = KafkaMessageConnect{} }
func (m *KafkaMessageConnect) String() string { return proto.CompactTextString(m) }
func (*KafkaMessageConnect) ProtoMessage() {}
func (*KafkaMessageConnect) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{3} }
func (m *KafkaMessageConnect) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
// LastOffsetPersisted is the encoded value for the Metadata message
// which is encoded in the ORDERER block metadata index for the case
// of the Kafka-based orderer.
type KafkaMetadata struct {
LastOffsetPersisted int64 `protobuf:"varint,1,opt,name=last_offset_persisted,json=lastOffsetPersisted" json:"last_offset_persisted,omitempty"`
}
func (m *KafkaMetadata) Reset() { *m = KafkaMetadata{} }
func (m *KafkaMetadata) String() string { return proto.CompactTextString(m) }
func (*KafkaMetadata) ProtoMessage() {}
func (*KafkaMetadata) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{4} }
func (m *KafkaMetadata) GetLastOffsetPersisted() int64 {
if m != nil {
return m.LastOffsetPersisted
}
return 0
}
func init() {
proto.RegisterType((*KafkaMessage)(nil), "orderer.KafkaMessage")
proto.RegisterType((*KafkaMessageRegular)(nil), "orderer.KafkaMessageRegular")
proto.RegisterType((*KafkaMessageTimeToCut)(nil), "orderer.KafkaMessageTimeToCut")
proto.RegisterType((*KafkaMessageConnect)(nil), "orderer.KafkaMessageConnect")
proto.RegisterType((*KafkaMetadata)(nil), "orderer.KafkaMetadata")
}
func init() { proto.RegisterFile("orderer/kafka.proto", fileDescriptor2) }
var fileDescriptor2 = []byte{
// 316 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x91, 0x4f, 0x6b, 0xc2, 0x40,
0x10, 0xc5, 0xb5, 0x8a, 0xd2, 0xd1, 0x5e, 0x22, 0x42, 0x0e, 0xa5, 0xb4, 0x42, 0xa1, 0x87, 0x92,
0x80, 0xbd, 0x94, 0x9e, 0x8a, 0x5e, 0x84, 0xd2, 0x3f, 0x2c, 0xf6, 0xd2, 0x4b, 0xd8, 0x6c, 0x26,
0x31, 0x98, 0xb8, 0x61, 0x77, 0x72, 0xf0, 0x3b, 0xf6, 0x43, 0x95, 0xec, 0x6e, 0x40, 0x4a, 0xf0,
0x38, 0xf3, 0x7e, 0x8f, 0xf7, 0x76, 0x16, 0x66, 0x52, 0x25, 0xa8, 0x50, 0x85, 0x7b, 0x9e, 0xee,
0x79, 0x50, 0x29, 0x49, 0xd2, 0x1b, 0xbb, 0xe5, 0xe2, 0xb7, 0x0f, 0xd3, 0xb7, 0x46, 0x78, 0x47,
0xad, 0x79, 0x86, 0xde, 0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