Class: Hermes::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/hermes/configuration.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#adapterObject

Returns the value of attribute adapter.



3
4
5
# File 'lib/hermes/configuration.rb', line 3

def adapter
  @adapter
end

#application_prefixObject

Returns the value of attribute application_prefix.



3
4
5
# File 'lib/hermes/configuration.rb', line 3

def application_prefix
  @application_prefix
end

#background_processorObject

Returns the value of attribute background_processor.



3
4
5
# File 'lib/hermes/configuration.rb', line 3

def background_processor
  @background_processor
end

#clockObject

Returns the value of attribute clock.



3
4
5
# File 'lib/hermes/configuration.rb', line 3

def clock
  @clock
end

#database_connection_providerObject

Returns the value of attribute database_connection_provider.



3
4
5
# File 'lib/hermes/configuration.rb', line 3

def database_connection_provider
  @database_connection_provider
end

#database_error_handlerObject

Returns the value of attribute database_error_handler.



3
4
5
# File 'lib/hermes/configuration.rb', line 3

def database_error_handler
  @database_error_handler
end

#distributed_tracing_database_tableObject

Returns the value of attribute distributed_tracing_database_table.



3
4
5
# File 'lib/hermes/configuration.rb', line 3

def distributed_tracing_database_table
  @distributed_tracing_database_table
end

#distributed_tracing_database_uriObject

Returns the value of attribute distributed_tracing_database_uri.



3
4
5
# File 'lib/hermes/configuration.rb', line 3

def distributed_tracing_database_uri
  @distributed_tracing_database_uri
end

#distributes_tracing_mapperObject

Returns the value of attribute distributes_tracing_mapper.



3
4
5
# File 'lib/hermes/configuration.rb', line 3

def distributes_tracing_mapper
  @distributes_tracing_mapper
end

#enqueue_methodObject

Returns the value of attribute enqueue_method.



3
4
5
# File 'lib/hermes/configuration.rb', line 3

def enqueue_method
  @enqueue_method
end

#error_notification_serviceObject

Returns the value of attribute error_notification_service.



3
4
5
# File 'lib/hermes/configuration.rb', line 3

def error_notification_service
  @error_notification_service
end

#event_handlerObject

Returns the value of attribute event_handler.



3
4
5
# File 'lib/hermes/configuration.rb', line 3

def event_handler
  @event_handler
end

#hutchObject

Returns the value of attribute hutch.



3
4
5
# File 'lib/hermes/configuration.rb', line 3

def hutch
  @hutch
end

#instrumenterObject

Returns the value of attribute instrumenter.



3
4
5
# File 'lib/hermes/configuration.rb', line 3

def instrumenter
  @instrumenter
end

#loggerObject

Returns the value of attribute logger.



3
4
5
# File 'lib/hermes/configuration.rb', line 3

def logger
  @logger
end

#logger_params_filterObject

Returns the value of attribute logger_params_filter.



3
4
5
# File 'lib/hermes/configuration.rb', line 3

def logger_params_filter
  @logger_params_filter
end

#producer_error_handlerObject

Returns the value of attribute producer_error_handler.



3
4
5
# File 'lib/hermes/configuration.rb', line 3

def producer_error_handler
  @producer_error_handler
end

#producer_error_handler_job_classObject

Returns the value of attribute producer_error_handler_job_class.



3
4
5
# File 'lib/hermes/configuration.rb', line 3

def producer_error_handler_job_class
  @producer_error_handler_job_class
end

#producer_retryableObject

Returns the value of attribute producer_retryable.



3
4
5
# File 'lib/hermes/configuration.rb', line 3

def producer_retryable
  @producer_retryable
end

#rpc_call_timeoutObject

Returns the value of attribute rpc_call_timeout.



3
4
5
# File 'lib/hermes/configuration.rb', line 3

def rpc_call_timeout
  @rpc_call_timeout
end

#tracerObject

Returns the value of attribute tracer.



3
4
5
# File 'lib/hermes/configuration.rb', line 3

def tracer
  @tracer
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Yields:



14
15
16
# File 'lib/hermes/configuration.rb', line 14

def self.configure
  yield configuration
end

Instance Method Details

#configure_hutch {|hutch| ... } ⇒ Object

Yields:



9
10
11
12
# File 'lib/hermes/configuration.rb', line 9

def configure_hutch
  yield hutch
  hutch.commit_config
end

#enable_safe_producer(producer_error_handler_job_class) ⇒ Object



67
68
69
70
71
72
73
74
75
# File 'lib/hermes/configuration.rb', line 67

def enable_safe_producer(producer_error_handler_job_class)
  self.producer_error_handler_job_class = producer_error_handler_job_class

  @producer_error_handler = Hermes::ProducerErrorHandler::SafeHandler.new(
    job_class: producer_error_handler_job_class,
    error_notifier: error_notification_service,
    retryable: producer_retryable
  )
end

#store_distributed_traces?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/hermes/configuration.rb', line 34

def store_distributed_traces?
  !!distributed_tracing_database_uri
end