Class: EventStoreClient::GRPC::Cluster::InsecureConnection

Inherits:
EventStoreClient::GRPC::Connection show all
Defined in:
lib/event_store_client/adapters/grpc/cluster/insecure_connection.rb

Instance Method Summary collapse

Methods inherited from EventStoreClient::GRPC::Connection

#initialize, new, secure?

Methods included from Extensions::OptionsExtension

included, #initialize, #options_hash

Constructor Details

This class inherits a constructor from EventStoreClient::GRPC::Connection

Instance Method Details

#call(stub_class) ⇒ Object

Returns instance of the given stub_class class.

Parameters:

  • stub_class

    GRPC request stub class. E.g. EventStore::Client::Gossip::Gossip::Stub

Returns:

  • instance of the given stub_class class



9
10
11
12
13
14
15
16
17
# File 'lib/event_store_client/adapters/grpc/cluster/insecure_connection.rb', line 9

def call(stub_class)
  config.logger&.debug('Using insecure connection.')
  stub_class.new(
    "#{host}:#{port}",
    :this_channel_is_insecure,
    channel_args: config.channel_args,
    timeout: (timeout / 1000.0 if timeout)
  )
end