Class: Aws::SageMakerRuntimeHTTP2::EventStreams::RequestStreamEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-sdk-sagemakerruntimehttp2/event_streams.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRequestStreamEvent

Returns a new instance of RequestStreamEvent.



14
15
16
# File 'lib/aws-sdk-sagemakerruntimehttp2/event_streams.rb', line 14

def initialize
  @event_emitter = Aws::EventEmitter.new
end

Instance Attribute Details

#event_emitterObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns Aws::EventEmitter.

Returns:

  • Aws::EventEmitter



42
43
44
# File 'lib/aws-sdk-sagemakerruntimehttp2/event_streams.rb', line 42

def event_emitter
  @event_emitter
end

Instance Method Details

#signal_end_streamObject



36
37
38
# File 'lib/aws-sdk-sagemakerruntimehttp2/event_streams.rb', line 36

def signal_end_stream
  @event_emitter.emit(:end_stream, {})
end

#signal_payload_part_event(params = {}) ⇒ Object

Parameters:

  • params (Hash) (defaults to: {})

    a customizable set of options

Options Hash (params):

  • :bytes (String, StringIO, File)

    The payload bytes.

  • :data_type (String)

    Data type header. Can be one of these possible values: "UTF8", "BINARY".

  • :completion_state (String)

    Completion state header. Can be one of these possible values: "PARTIAL", "COMPLETE".

  • :p (String)

    Padding string for alignment.



32
33
34
# File 'lib/aws-sdk-sagemakerruntimehttp2/event_streams.rb', line 32

def signal_payload_part_event(params = {})
  @event_emitter.emit(:payload_part, params)
end