github.com/leonlxy/hyperledger@v1.0.0-alpha.0.20170427033203-34922035d248/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 // 316 bytes of a gzipped FileDescriptorProto 228 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x91, 0x4f, 0x6b, 0xc2, 0x40, 229 0x10, 0xc5, 0xb5, 0x8a, 0xd2, 0xd1, 0x5e, 0x22, 0x42, 0x0e, 0xa5, 0xb4, 0x42, 0xa1, 0x87, 0x92, 230 0x80, 0xbd, 0x94, 0x9e, 0x8a, 0x5e, 0x84, 0xd2, 0x3f, 0x2c, 0xf6, 0xd2, 0x4b, 0xd8, 0x6c, 0x26, 231 0x31, 0x98, 0xb8, 0x61, 0x77, 0x72, 0xf0, 0x3b, 0xf6, 0x43, 0x95, 0xec, 0x6e, 0x40, 0x4a, 0xf0, 232 0x38, 0xf3, 0x7e, 0x8f, 0xf7, 0x76, 0x16, 0x66, 0x52, 0x25, 0xa8, 0x50, 0x85, 0x7b, 0x9e, 0xee, 233 0x79, 0x50, 0x29, 0x49, 0xd2, 0x1b, 0xbb, 0xe5, 0xe2, 0xb7, 0x0f, 0xd3, 0xb7, 0x46, 0x78, 0x47, 234 0xad, 0x79, 0x86, 0xde, 0x33, 0x8c, 0x15, 0x66, 0x75, 0xc1, 0x95, 0xdf, 0xbf, 0xed, 0x3f, 0x4c, 235 0x96, 0xd7, 0x81, 0x63, 0x83, 0x53, 0x8e, 0x59, 0x66, 0xd3, 0x63, 0x2d, 0xee, 0xbd, 0xc2, 0x84, 236 0xf2, 0x12, 0x23, 0x92, 0x91, 0xa8, 0xc9, 0xbf, 0x30, 0xee, 0x9b, 0x4e, 0xf7, 0x36, 0x2f, 0x71, 237 0x2b, 0xd7, 0x35, 0x6d, 0x7a, 0xec, 0x92, 0xda, 0xa1, 0xc9, 0x16, 0xf2, 0x70, 0x40, 0x41, 0xfe, 238 0xe0, 0x4c, 0xf6, 0xda, 0x32, 0x4d, 0xb6, 0xc3, 0x57, 0x23, 0x18, 0x6e, 0x8f, 0x15, 0x2e, 0x42, 239 0x98, 0x75, 0xb4, 0xf4, 0x7c, 0x18, 0x57, 0xfc, 0x58, 0x48, 0x9e, 0x98, 0x47, 0x4d, 0x59, 0x3b, 240 0x2e, 0x5e, 0x60, 0xde, 0x59, 0xcc, 0xbb, 0x83, 0x69, 0x5c, 0x48, 0xb1, 0x8f, 0x0e, 0x75, 0x19, 241 0xa3, 0x3d, 0xc6, 0x90, 0x4d, 0xcc, 0xee, 0xc3, 0xac, 0xfe, 0x87, 0xb9, 0x5a, 0x67, 0xc2, 0xd6, 242 0x70, 0xe5, 0x0c, 0xc4, 0x13, 0x4e, 0xdc, 0x5b, 0xc2, 0xbc, 0xe0, 0x9a, 0x22, 0x99, 0xa6, 0x1a, 243 0x29, 0xaa, 0x50, 0xe9, 0x5c, 0x13, 0x5a, 0xe3, 0x80, 0xcd, 0x1a, 0xf1, 0xd3, 0x68, 0x5f, 0xad, 244 0xb4, 0xfa, 0x86, 0x7b, 0xa9, 0xb2, 0x60, 0x77, 0xac, 0x50, 0x15, 0x98, 0x64, 0xa8, 0x82, 0x94, 245 0xc7, 0x2a, 0x17, 0xf6, 0x6b, 0x75, 0x7b, 0xb2, 0x9f, 0xc7, 0x2c, 0xa7, 0x5d, 0x1d, 0x07, 0x42, 246 0x96, 0xe1, 0x09, 0x1d, 0x5a, 0x3a, 0xb4, 0x74, 0xe8, 0xe8, 0x78, 0x64, 0xe6, 0xa7, 0xbf, 0x00, 247 0x00, 0x00, 0xff, 0xff, 0x15, 0x78, 0x4d, 0xd8, 0x2f, 0x02, 0x00, 0x00, 248 }