Class: Workato::Connector::Sdk::Stream::Proxy Private
- Inherits:
-
Object
- Object
- Workato::Connector::Sdk::Stream::Proxy
- Extended by:
- T::Sig
- Defined in:
- lib/workato/connector/sdk/stream.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #as_json(_options = nil) ⇒ Hash{String => T.untyped} private
- #initialize(name:, input:, stream:) ⇒ void constructor private
- #read(from:, frame_size:, &_blk) ⇒ void private
Constructor Details
#initialize(name:, input:, stream:) ⇒ void
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.
177 178 179 180 181 |
# File 'lib/workato/connector/sdk/stream.rb', line 177 def initialize(name:, input:, stream:) @name = name @input = input @stream = stream end |
Instance Method Details
#as_json(_options = nil) ⇒ Hash{String => T.untyped}
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.
184 185 186 187 188 189 190 |
# File 'lib/workato/connector/sdk/stream.rb', line 184 def as_json( = nil) { __stream__: true, name: name, input: input } end |
#read(from:, frame_size:, &_blk) ⇒ void
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.
This method returns an undefined value.
193 194 195 196 197 198 199 200 201 202 |
# File 'lib/workato/connector/sdk/stream.rb', line 193 def read(from:, frame_size:, &_blk) next_from = from loop do res = read_chunk(next_from, frame_size) yield(res.data, res.from, res.eof, res.next_from) break if res.eof next_from = T.must(res.next_from) end end |