Class: Aws::EventStream::Message
- Inherits:
-
Object
- Object
- Aws::EventStream::Message
- Defined in:
- lib/aws-eventstream/message.rb
Instance Attribute Summary collapse
-
#headers ⇒ Hash
readonly
Headers of a message.
-
#payload ⇒ IO
readonly
Payload of a message, size not exceed 16MB.
Instance Method Summary collapse
-
#initialize(options) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(options) ⇒ Message
Returns a new instance of Message.
5 6 7 8 |
# File 'lib/aws-eventstream/message.rb', line 5 def initialize() @headers = [:headers] || {} @payload = [:payload] || StringIO.new end |
Instance Attribute Details
#headers ⇒ Hash (readonly)
Returns headers of a message.
11 12 13 |
# File 'lib/aws-eventstream/message.rb', line 11 def headers @headers end |
#payload ⇒ IO (readonly)
Returns payload of a message, size not exceed 16MB. StringIO is returned for <= 1MB payload Tempfile is returned for > 1MB payload.
16 17 18 |
# File 'lib/aws-eventstream/message.rb', line 16 def payload @payload end |