Class: CarrotRpc::Configuration

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

Overview

Global configuration for CarrotRpc. Access with configuration.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

logfile - set logger to a file. overrides rails logger.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/carrot_rpc/configuration.rb', line 9

def initialize # rubocop:disable Metrics/MethodLength
  @logfile = nil
  @loglevel = Logger::DEBUG
  @logger = nil
  @daemonize = false
  @pidfile = nil
  @autoload_rails = true
  @bunny = nil
  @before_request = nil
  @rpc_client_timeout = 5
  @rpc_client_response_key_format = :none
  @rpc_client_request_key_format = :none
  @client_test_mode = false
  @server_test_mode = false
  @thread_request_variable = nil
end

Instance Attribute Details

#autoload_railsObject

Returns the value of attribute autoload_rails.



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

def autoload_rails
  @autoload_rails
end

#before_requestObject

Returns the value of attribute before_request.



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

def before_request
  @before_request
end

#bunnyObject

Returns the value of attribute bunny.



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

def bunny
  @bunny
end

#client_test_modeObject

Returns the value of attribute client_test_mode.



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

def client_test_mode
  @client_test_mode
end

#daemonizeObject

Returns the value of attribute daemonize.



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

def daemonize
  @daemonize
end

#logfileObject

Returns the value of attribute logfile.



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

def logfile
  @logfile
end

#loggerObject

Returns the value of attribute logger.



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

def logger
  @logger
end

#loglevelObject

Returns the value of attribute loglevel.



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

def loglevel
  @loglevel
end

#pidfileObject

Returns the value of attribute pidfile.



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

def pidfile
  @pidfile
end

#rpc_client_request_key_formatObject

Returns the value of attribute rpc_client_request_key_format.



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

def rpc_client_request_key_format
  @rpc_client_request_key_format
end

#rpc_client_response_key_formatObject

Returns the value of attribute rpc_client_response_key_format.



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

def rpc_client_response_key_format
  @rpc_client_response_key_format
end

#rpc_client_timeoutObject

Returns the value of attribute rpc_client_timeout.



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

def rpc_client_timeout
  @rpc_client_timeout
end

#server_test_modeObject

Returns the value of attribute server_test_mode.



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

def server_test_mode
  @server_test_mode
end

#thread_request_variableObject

Returns the value of attribute thread_request_variable.



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

def thread_request_variable
  @thread_request_variable
end