consumer_metadata_request.go 440 B

12345678910111213141516171819202122
  1. package sarama
  2. type ConsumerMetadataRequest struct {
  3. ConsumerGroup string
  4. }
  5. func (r *ConsumerMetadataRequest) encode(pe packetEncoder) error {
  6. return pe.putString(r.ConsumerGroup)
  7. }
  8. func (r *ConsumerMetadataRequest) decode(pd packetDecoder) (err error) {
  9. r.ConsumerGroup, err = pd.getString()
  10. return err
  11. }
  12. func (r *ConsumerMetadataRequest) key() int16 {
  13. return 10
  14. }
  15. func (r *ConsumerMetadataRequest) version() int16 {
  16. return 0
  17. }