Class: KafkaSyrup::Protocol::FetchRequest::Partition

Inherits:
Struct
  • Object
show all
Defined in:
lib/kafka_syrup/protocol/fetch_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



49
50
51
# File 'lib/kafka_syrup/protocol/fetch_request.rb', line 49

def id
  @id
end

#max_bytesObject

Returns the value of attribute max_bytes

Returns:

  • (Object)

    the current value of max_bytes



49
50
51
# File 'lib/kafka_syrup/protocol/fetch_request.rb', line 49

def max_bytes
  @max_bytes
end

#offsetObject

Returns the value of attribute offset

Returns:

  • (Object)

    the current value of offset



49
50
51
# File 'lib/kafka_syrup/protocol/fetch_request.rb', line 49

def offset
  @offset
end

Instance Method Details

#encodeObject



50
51
52
53
54
55
56
# File 'lib/kafka_syrup/protocol/fetch_request.rb', line 50

def encode
  [
    E.write_int32(id),
    E.write_int64(offset),
    E.write_int32(max_bytes)
  ].join
end