Class: EventStoreClient::Config
Constant Summary
collapse
- CHANNEL_ARGS_DEFAULTS =
{
'grpc.min_reconnect_backoff_ms' => 100, 'grpc.max_reconnect_backoff_ms' => 100, 'grpc.initial_reconnect_backoff_ms' => 100 }.freeze
Instance Method Summary
collapse
included, #initialize, #options_hash
Instance Method Details
#channel_args=(val) ⇒ Hash
48
49
50
51
52
53
54
|
# File 'lib/event_store_client/config.rb', line 48
def channel_args=(val)
channel_args = CHANNEL_ARGS_DEFAULTS.merge(val&.transform_keys(&:to_s) || {})
channel_args['grpc.enable_retries'] = 0
@channel_args = channel_args
end
|
#eventstore_url=(value) ⇒ Object
28
29
30
31
32
33
34
35
|
# File 'lib/event_store_client/config.rb', line 28
def eventstore_url=(value)
@eventstore_url =
if value.is_a?(Connection::Url)
value
else
Connection::UrlParser.new.call(value)
end
end
|
#logger=(logger) ⇒ Logger?
39
40
41
42
43
44
|
# File 'lib/event_store_client/config.rb', line 39
def logger=(logger)
::GRPC.define_singleton_method :logger do
@logger ||= logger.nil? ? ::GRPC::DefaultLogger::NoopLogger.new : logger
end
@logger = logger
end
|