github.com/kchristidis/fabric@v1.0.4-0.20171028114726-837acd08cde1/protos/orderer/kafka.pb.go (about)

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