Class: KafkaSyrup::Protocol::OffsetRequest::Partition

Inherits:
Struct
  • Object
show all
Defined in:
lib/kafka_syrup/protocol/offset_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



42
43
44
# File 'lib/kafka_syrup/protocol/offset_request.rb', line 42

def id
  @id
end

#max_offsetsObject

Returns the value of attribute max_offsets

Returns:

  • (Object)

    the current value of max_offsets



42
43
44
# File 'lib/kafka_syrup/protocol/offset_request.rb', line 42

def max_offsets
  @max_offsets
end

#timeObject

Returns the value of attribute time

Returns:

  • (Object)

    the current value of time



42
43
44
# File 'lib/kafka_syrup/protocol/offset_request.rb', line 42

def time
  @time
end

Instance Method Details

#encodeObject



43
44
45
46
47
48
49
# File 'lib/kafka_syrup/protocol/offset_request.rb', line 43

def encode
  [
    E.write_int32(id),
    E.write_int64(time),
    E.write_int32(max_offsets)
  ].join
end