D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
td-agent
/
embedded
/
lib
/
ruby
/
gems
/
2.1.0
/
gems
/
ruby-kafka-0.4.2
/
lib
/
kafka
/
Filename :
connection_builder.rb
back
Copy
module Kafka class ConnectionBuilder def initialize(client_id:, logger:, instrumenter:, connect_timeout:, socket_timeout:, ssl_context:, sasl_authenticator:) @client_id = client_id @logger = logger @instrumenter = instrumenter @connect_timeout = connect_timeout @socket_timeout = socket_timeout @ssl_context = ssl_context @sasl_authenticator = sasl_authenticator end def build_connection(host, port) connection = Connection.new( host: host, port: port, client_id: @client_id, connect_timeout: @connect_timeout, socket_timeout: @socket_timeout, logger: @logger, instrumenter: @instrumenter, ssl_context: @ssl_context, sasl_authenticator: @sasl_authenticator ) connection end end end