Class: Hermes::Configuration
- Inherits:
-
Object
- Object
- Hermes::Configuration
- Defined in:
- lib/hermes/configuration.rb
Instance Attribute Summary collapse
-
#adapter ⇒ Object
Returns the value of attribute adapter.
-
#application_prefix ⇒ Object
Returns the value of attribute application_prefix.
-
#background_processor ⇒ Object
Returns the value of attribute background_processor.
-
#clock ⇒ Object
Returns the value of attribute clock.
-
#database_connection_provider ⇒ Object
Returns the value of attribute database_connection_provider.
-
#database_error_handler ⇒ Object
Returns the value of attribute database_error_handler.
-
#distributed_tracing_database_table ⇒ Object
Returns the value of attribute distributed_tracing_database_table.
-
#distributed_tracing_database_uri ⇒ Object
Returns the value of attribute distributed_tracing_database_uri.
-
#distributes_tracing_mapper ⇒ Object
Returns the value of attribute distributes_tracing_mapper.
-
#enqueue_method ⇒ Object
Returns the value of attribute enqueue_method.
-
#error_notification_service ⇒ Object
Returns the value of attribute error_notification_service.
-
#event_handler ⇒ Object
Returns the value of attribute event_handler.
-
#hutch ⇒ Object
Returns the value of attribute hutch.
-
#instrumenter ⇒ Object
Returns the value of attribute instrumenter.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#logger_params_filter ⇒ Object
Returns the value of attribute logger_params_filter.
-
#producer_error_handler ⇒ Object
Returns the value of attribute producer_error_handler.
-
#producer_error_handler_job_class ⇒ Object
Returns the value of attribute producer_error_handler_job_class.
-
#producer_retryable ⇒ Object
Returns the value of attribute producer_retryable.
-
#rpc_call_timeout ⇒ Object
Returns the value of attribute rpc_call_timeout.
-
#tracer ⇒ Object
Returns the value of attribute tracer.
Class Method Summary collapse
Instance Method Summary collapse
- #configure_hutch {|hutch| ... } ⇒ Object
- #enable_safe_producer(producer_error_handler_job_class) ⇒ Object
- #store_distributed_traces? ⇒ Boolean
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
3 4 5 |
# File 'lib/hermes/configuration.rb', line 3 def adapter @adapter end |
#application_prefix ⇒ Object
Returns the value of attribute application_prefix.
3 4 5 |
# File 'lib/hermes/configuration.rb', line 3 def application_prefix @application_prefix end |
#background_processor ⇒ Object
Returns the value of attribute background_processor.
3 4 5 |
# File 'lib/hermes/configuration.rb', line 3 def background_processor @background_processor end |
#clock ⇒ Object
Returns the value of attribute clock.
3 4 5 |
# File 'lib/hermes/configuration.rb', line 3 def clock @clock end |
#database_connection_provider ⇒ Object
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_handler ⇒ Object
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_table ⇒ Object
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_uri ⇒ Object
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_mapper ⇒ Object
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_method ⇒ Object
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_service ⇒ Object
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_handler ⇒ Object
Returns the value of attribute event_handler.
3 4 5 |
# File 'lib/hermes/configuration.rb', line 3 def event_handler @event_handler end |
#hutch ⇒ Object
Returns the value of attribute hutch.
3 4 5 |
# File 'lib/hermes/configuration.rb', line 3 def hutch @hutch end |
#instrumenter ⇒ Object
Returns the value of attribute instrumenter.
3 4 5 |
# File 'lib/hermes/configuration.rb', line 3 def instrumenter @instrumenter end |
#logger ⇒ Object
Returns the value of attribute logger.
3 4 5 |
# File 'lib/hermes/configuration.rb', line 3 def logger @logger end |
#logger_params_filter ⇒ Object
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_handler ⇒ Object
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_class ⇒ Object
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_retryable ⇒ Object
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_timeout ⇒ Object
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 |
#tracer ⇒ Object
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
14 15 16 |
# File 'lib/hermes/configuration.rb', line 14 def self.configure yield configuration end |
Instance Method Details
#configure_hutch {|hutch| ... } ⇒ Object
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
34 35 36 |
# File 'lib/hermes/configuration.rb', line 34 def store_distributed_traces? !!distributed_tracing_database_uri end |