Class: LogStashLogger::Device::Kinesis
- Inherits:
-
AwsStream
- Object
- Base
- Connectable
- AwsStream
- LogStashLogger::Device::Kinesis
- Defined in:
- lib/logstash-logger/device/kinesis.rb
Constant Summary
Constants inherited from AwsStream
Instance Attribute Summary
Attributes inherited from AwsStream
Attributes inherited from Connectable
Attributes inherited from Base
Instance Method Summary collapse
- #get_response_records(resp) ⇒ Object
- #is_successful_response(resp) ⇒ Object
- #put_records(records) ⇒ Object
- #transform_message(message) ⇒ Object
Methods inherited from AwsStream
#close!, #connect, #initialize, #with_connection, #write_batch, #write_one
Methods inherited from Connectable
#close, #connect, #connected?, #flush, #initialize, #on_full_buffer_receive, #reconnect, #reset, #to_io, #with_connection, #write, #write_batch, #write_one
Methods included from Buffer
#buffer_flush, #buffer_full?, #buffer_initialize, #buffer_receive, #reset_buffer
Methods inherited from Base
#close, #close!, #flush, #initialize, #reset, #to_io, #unrecoverable_error?, #write, #write_batch, #write_one
Constructor Details
This class inherits a constructor from LogStashLogger::Device::AwsStream
Instance Method Details
#get_response_records(resp) ⇒ Object
38 39 40 |
# File 'lib/logstash-logger/device/kinesis.rb', line 38 def get_response_records(resp) resp.records end |
#is_successful_response(resp) ⇒ Object
34 35 36 |
# File 'lib/logstash-logger/device/kinesis.rb', line 34 def is_successful_response(resp) resp.failed_record_count == 0 end |
#put_records(records) ⇒ Object
27 28 29 30 31 32 |
# File 'lib/logstash-logger/device/kinesis.rb', line 27 def put_records(records) @io.put_records({ records: records, stream_name: @stream }) end |
#transform_message(message) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/logstash-logger/device/kinesis.rb', line 20 def () { data: , partition_key: SecureRandom.uuid } end |