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.
7 8 9 10 |
# File 'lib/aws-eventstream/message.rb', line 7 def initialize() @headers = [:headers] || {} @payload = [:payload] || StringIO.new end |
Instance Attribute Details
#headers ⇒ Hash (readonly)
Returns headers of a message.
13 14 15 |
# File 'lib/aws-eventstream/message.rb', line 13 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.
18 19 20 |
# File 'lib/aws-eventstream/message.rb', line 18 def payload @payload end |