github.com/adnan-c/fabric_e2e_couchdb@v0.6.1-preview.0.20170228180935-21ce6b23cf91/protos/orderer/kafka.pb.go (about) 1 // Code generated by protoc-gen-go. 2 // source: orderer/kafka.proto 3 // DO NOT EDIT! 4 5 package orderer 6 7 import proto "github.com/golang/protobuf/proto" 8 import fmt "fmt" 9 import math "math" 10 11 // Reference imports to suppress errors if they are not otherwise used. 12 var _ = proto.Marshal 13 var _ = fmt.Errorf 14 var _ = math.Inf 15 16 // KafkaMessage is a wrapper type for the messages 17 // that the Kafka-based orderer deals with. 18 type KafkaMessage struct { 19 // Types that are valid to be assigned to Type: 20 // *KafkaMessage_Regular 21 // *KafkaMessage_TimeToCut 22 // *KafkaMessage_Connect 23 Type isKafkaMessage_Type `protobuf_oneof:"Type"` 24 } 25 26 func (m *KafkaMessage) Reset() { *m = KafkaMessage{} } 27 func (m *KafkaMessage) String() string { return proto.CompactTextString(m) } 28 func (*KafkaMessage) ProtoMessage() {} 29 func (*KafkaMessage) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } 30 31 type isKafkaMessage_Type interface { 32 isKafkaMessage_Type() 33 } 34 35 type KafkaMessage_Regular struct { 36 Regular *KafkaMessageRegular `protobuf:"bytes,1,opt,name=regular,oneof"` 37 } 38 type KafkaMessage_TimeToCut struct { 39 TimeToCut *KafkaMessageTimeToCut `protobuf:"bytes,2,opt,name=time_to_cut,json=timeToCut,oneof"` 40 } 41 type KafkaMessage_Connect struct { 42 Connect *KafkaMessageConnect `protobuf:"bytes,3,opt,name=connect,oneof"` 43 } 44 45 func (*KafkaMessage_Regular) isKafkaMessage_Type() {} 46 func (*KafkaMessage_TimeToCut) isKafkaMessage_Type() {} 47 func (*KafkaMessage_Connect) isKafkaMessage_Type() {} 48 49 func (m *KafkaMessage) GetType() isKafkaMessage_Type { 50 if m != nil { 51 return m.Type 52 } 53 return nil 54 } 55 56 func (m *KafkaMessage) GetRegular() *KafkaMessageRegular { 57 if x, ok := m.GetType().(*KafkaMessage_Regular); ok { 58 return x.Regular 59 } 60 return nil 61 } 62 63 func (m *KafkaMessage) GetTimeToCut() *KafkaMessageTimeToCut { 64 if x, ok := m.GetType().(*KafkaMessage_TimeToCut); ok { 65 return x.TimeToCut 66 } 67 return nil 68 } 69 70 func (m *KafkaMessage) GetConnect() *KafkaMessageConnect { 71 if x, ok := m.GetType().(*KafkaMessage_Connect); ok { 72 return x.Connect 73 } 74 return nil 75 } 76 77 // XXX_OneofFuncs is for the internal use of the proto package. 78 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{}) { 79 return _KafkaMessage_OneofMarshaler, _KafkaMessage_OneofUnmarshaler, _KafkaMessage_OneofSizer, []interface{}{ 80 (*KafkaMessage_Regular)(nil), 81 (*KafkaMessage_TimeToCut)(nil), 82 (*KafkaMessage_Connect)(nil), 83 } 84 } 85 86 func _KafkaMessage_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { 87 m := msg.(*KafkaMessage) 88 // Type 89 switch x := m.Type.(type) { 90 case *KafkaMessage_Regular: 91 b.EncodeVarint(1<<3 | proto.WireBytes) 92 if err := b.EncodeMessage(x.Regular); err != nil { 93 return err 94 } 95 case *KafkaMessage_TimeToCut: 96 b.EncodeVarint(2<<3 | proto.WireBytes) 97 if err := b.EncodeMessage(x.TimeToCut); err != nil { 98 return err 99 } 100 case *KafkaMessage_Connect: 101 b.EncodeVarint(3<<3 | proto.WireBytes) 102 if err := b.EncodeMessage(x.Connect); err != nil { 103 return err 104 } 105 case nil: 106 default: 107 return fmt.Errorf("KafkaMessage.Type has unexpected type %T", x) 108 } 109 return nil 110 } 111 112 func _KafkaMessage_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { 113 m := msg.(*KafkaMessage) 114 switch tag { 115 case 1: // Type.regular 116 if wire != proto.WireBytes { 117 return true, proto.ErrInternalBadWireType 118 } 119 msg := new(KafkaMessageRegular) 120 err := b.DecodeMessage(msg) 121 m.Type = &KafkaMessage_Regular{msg} 122 return true, err 123 case 2: // Type.time_to_cut 124 if wire != proto.WireBytes { 125 return true, proto.ErrInternalBadWireType 126 } 127 msg := new(KafkaMessageTimeToCut) 128 err := b.DecodeMessage(msg) 129 m.Type = &KafkaMessage_TimeToCut{msg} 130 return true, err 131 case 3: // Type.connect 132 if wire != proto.WireBytes { 133 return true, proto.ErrInternalBadWireType 134 } 135 msg := new(KafkaMessageConnect) 136 err := b.DecodeMessage(msg) 137 m.Type = &KafkaMessage_Connect{msg} 138 return true, err 139 default: 140 return false, nil 141 } 142 } 143 144 func _KafkaMessage_OneofSizer(msg proto.Message) (n int) { 145 m := msg.(*KafkaMessage) 146 // Type 147 switch x := m.Type.(type) { 148 case *KafkaMessage_Regular: 149 s := proto.Size(x.Regular) 150 n += proto.SizeVarint(1<<3 | proto.WireBytes) 151 n += proto.SizeVarint(uint64(s)) 152 n += s 153 case *KafkaMessage_TimeToCut: 154 s := proto.Size(x.TimeToCut) 155 n += proto.SizeVarint(2<<3 | proto.WireBytes) 156 n += proto.SizeVarint(uint64(s)) 157 n += s 158 case *KafkaMessage_Connect: 159 s := proto.Size(x.Connect) 160 n += proto.SizeVarint(3<<3 | proto.WireBytes) 161 n += proto.SizeVarint(uint64(s)) 162 n += s 163 case nil: 164 default: 165 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) 166 } 167 return n 168 } 169 170 // KafkaMessageRegular wraps a marshalled envelope. 171 type KafkaMessageRegular struct { 172 Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` 173 } 174 175 func (m *KafkaMessageRegular) Reset() { *m = KafkaMessageRegular{} } 176 func (m *KafkaMessageRegular) String() string { return proto.CompactTextString(m) } 177 func (*KafkaMessageRegular) ProtoMessage() {} 178 func (*KafkaMessageRegular) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} } 179 180 // KafkaMessageTimeToCut is used to signal to the orderers 181 // that it is time to cut block <block_number>. 182 type KafkaMessageTimeToCut struct { 183 BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber" json:"block_number,omitempty"` 184 } 185 186 func (m *KafkaMessageTimeToCut) Reset() { *m = KafkaMessageTimeToCut{} } 187 func (m *KafkaMessageTimeToCut) String() string { return proto.CompactTextString(m) } 188 func (*KafkaMessageTimeToCut) ProtoMessage() {} 189 func (*KafkaMessageTimeToCut) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{2} } 190 191 // KafkaMessageConnect is posted by an orderer upon booting up. 192 // It is used to prevent the panic that would be caused if we 193 // were to consume an empty partition. It is ignored by all 194 // orderers when processing the partition. 195 type KafkaMessageConnect struct { 196 Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` 197 } 198 199 func (m *KafkaMessageConnect) Reset() { *m = KafkaMessageConnect{} } 200 func (m *KafkaMessageConnect) String() string { return proto.CompactTextString(m) } 201 func (*KafkaMessageConnect) ProtoMessage() {} 202 func (*KafkaMessageConnect) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{3} } 203 204 // LastOffsetPersisted is the encoded value for the Metadata message 205 // which is encoded in the ORDERER block metadata index for the case 206 // of the Kafka-based orderer. 207 type KafkaMetadata struct { 208 LastOffsetPersisted int64 `protobuf:"varint,1,opt,name=last_offset_persisted,json=lastOffsetPersisted" json:"last_offset_persisted,omitempty"` 209 } 210 211 func (m *KafkaMetadata) Reset() { *m = KafkaMetadata{} } 212 func (m *KafkaMetadata) String() string { return proto.CompactTextString(m) } 213 func (*KafkaMetadata) ProtoMessage() {} 214 func (*KafkaMetadata) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{4} } 215 216 func init() { 217 proto.RegisterType((*KafkaMessage)(nil), "orderer.KafkaMessage") 218 proto.RegisterType((*KafkaMessageRegular)(nil), "orderer.KafkaMessageRegular") 219 proto.RegisterType((*KafkaMessageTimeToCut)(nil), "orderer.KafkaMessageTimeToCut") 220 proto.RegisterType((*KafkaMessageConnect)(nil), "orderer.KafkaMessageConnect") 221 proto.RegisterType((*KafkaMetadata)(nil), "orderer.KafkaMetadata") 222 } 223 224 func init() { proto.RegisterFile("orderer/kafka.proto", fileDescriptor2) } 225 226 var fileDescriptor2 = []byte{ 227 // 304 bytes of a gzipped FileDescriptorProto 228 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x91, 0x3d, 0x6b, 0xf3, 0x30, 229 0x14, 0x85, 0x93, 0x37, 0x21, 0xe1, 0x55, 0xd2, 0x45, 0x21, 0xe0, 0xa1, 0x94, 0x36, 0x53, 0x87, 230 0x62, 0x41, 0xba, 0x94, 0x4e, 0x25, 0x59, 0x02, 0xa5, 0x1f, 0x08, 0x4f, 0x5d, 0x8c, 0x2c, 0x5f, 231 0x3b, 0xc6, 0x1f, 0x32, 0xd2, 0xf5, 0xe0, 0xff, 0xd8, 0x1f, 0x55, 0x2c, 0xcb, 0x50, 0x8a, 0xc9, 232 0x78, 0xef, 0x79, 0x0e, 0xe7, 0xe8, 0x8a, 0x6c, 0x94, 0x8e, 0x41, 0x83, 0x66, 0xb9, 0x48, 0x72, 233 0xe1, 0xd7, 0x5a, 0xa1, 0xa2, 0x4b, 0xb7, 0xdc, 0x7d, 0x4f, 0xc9, 0xfa, 0xb5, 0x13, 0xde, 0xc0, 234 0x18, 0x91, 0x02, 0x7d, 0x22, 0x4b, 0x0d, 0x69, 0x53, 0x08, 0xed, 0x4d, 0x6f, 0xa7, 0xf7, 0xab, 235 0xfd, 0xb5, 0xef, 0x58, 0xff, 0x37, 0xc7, 0x7b, 0xe6, 0x34, 0xe1, 0x03, 0x4e, 0x5f, 0xc8, 0x0a, 236 0xb3, 0x12, 0x42, 0x54, 0xa1, 0x6c, 0xd0, 0xfb, 0x67, 0xdd, 0x37, 0xa3, 0xee, 0x20, 0x2b, 0x21, 237 0x50, 0xc7, 0x06, 0x4f, 0x13, 0xfe, 0x1f, 0x87, 0xa1, 0xcb, 0x96, 0xaa, 0xaa, 0x40, 0xa2, 0x37, 238 0xbb, 0x90, 0x7d, 0xec, 0x99, 0x2e, 0xdb, 0xe1, 0x87, 0x05, 0x99, 0x07, 0x6d, 0x0d, 0x3b, 0x46, 239 0x36, 0x23, 0x2d, 0xa9, 0x47, 0x96, 0xb5, 0x68, 0x0b, 0x25, 0x62, 0xfb, 0xa8, 0x35, 0x1f, 0xc6, 240 0xdd, 0x33, 0xd9, 0x8e, 0x16, 0xa3, 0x77, 0x64, 0x1d, 0x15, 0x4a, 0xe6, 0x61, 0xd5, 0x94, 0x11, 241 0xf4, 0xc7, 0x98, 0xf3, 0x95, 0xdd, 0xbd, 0xdb, 0xd5, 0xdf, 0x30, 0x57, 0xeb, 0x42, 0xd8, 0x91, 242 0x5c, 0x39, 0x03, 0x8a, 0x58, 0xa0, 0xa0, 0x7b, 0xb2, 0x2d, 0x84, 0xc1, 0x50, 0x25, 0x89, 0x01, 243 0x0c, 0x6b, 0xd0, 0x26, 0x33, 0x08, 0xbd, 0x71, 0xc6, 0x37, 0x9d, 0xf8, 0x61, 0xb5, 0xcf, 0x41, 244 0x3a, 0xf8, 0x5f, 0x0f, 0x69, 0x86, 0xe7, 0x26, 0xf2, 0xa5, 0x2a, 0xd9, 0xb9, 0xad, 0x41, 0x17, 245 0x10, 0xa7, 0xa0, 0x59, 0x22, 0x22, 0x9d, 0x49, 0x66, 0x7f, 0xd8, 0x30, 0x77, 0xb9, 0x68, 0x61, 246 0xe7, 0xc7, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x38, 0x89, 0x66, 0xa4, 0x08, 0x02, 0x00, 0x00, 247 }