Class: Ksql::Connection::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/ksql/connection/client.rb

Class Method Summary collapse

Class Method Details

.call_async(request) ⇒ Array

Prepare the HTTP2 Async Request based on the built input request

Parameters:

Returns:

  • (Array)

    Client, Built Async Request



28
29
30
31
32
# File 'lib/ksql/connection/client.rb', line 28

def call_async(request)
  @@client = client
  prepared_request = @@client.prepare_request(*request.to_params)
  return @@client, prepared_request
end

.call_sync(request) ⇒ Ksql::Connection::Response

Execute the HTTP2 Sync Request

Parameters:

Returns:



16
17
18
19
# File 'lib/ksql/connection/client.rb', line 16

def call_sync(request)
  response = client.call(*request.to_params)
  ::Ksql::Connection::Response.new(body: response.body, headers: response.headers)
end