Class: Grenache::Configuration
- Inherits:
-
Object
- Object
- Grenache::Configuration
- Defined in:
- lib/grenache/configurable.rb
Overview
Encapsulate Configuration parameters
Instance Attribute Summary collapse
-
#auto_announce ⇒ Object
service configuration parameters.
-
#auto_announce_interval ⇒ Object
service configuration parameters.
-
#ca ⇒ Object
service SSL specific configuration Cert is supposed to be PKCS12.
-
#cert_pem ⇒ Object
service SSL specific configuration Cert is supposed to be PKCS12.
-
#grape_address ⇒ Object
grape configuration.
-
#key ⇒ Object
service SSL specific configuration Cert is supposed to be PKCS12.
-
#reject_unauthorized ⇒ Object
service SSL specific configuration Cert is supposed to be PKCS12.
-
#service_host ⇒ Object
service configuration parameters.
-
#service_timeout ⇒ Object
service configuration parameters.
-
#timeout ⇒ Object
grape configuration.
-
#verify_mode ⇒ Object
service SSL specific configuration Cert is supposed to be PKCS12.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Configuration
constructor
Initialize default values.
Constructor Details
#initialize(params = {}) ⇒ Configuration
Initialize default values
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/grenache/configurable.rb', line 16 def initialize(params = {}) set_val :grape_address, params, "ws://127.0.0.1:30001" set_val :timeout, params, 5 set_val :auto_announce_interval, params, 5 set_bool :auto_announce, params, true set_val :service_timeout, params, 5 set_val :service_host, params, "0.0.0.0" set_val :key, params, nil set_val :cert_pem, params, nil set_val :ca, params, nil set_val :reject_unauthorized, params, nil set_val :verify_mode, params, Grenache::SSL_VERIFY_PEER end |
Instance Attribute Details
#auto_announce ⇒ Object
service configuration parameters
9 10 11 |
# File 'lib/grenache/configurable.rb', line 9 def auto_announce @auto_announce end |
#auto_announce_interval ⇒ Object
service configuration parameters
9 10 11 |
# File 'lib/grenache/configurable.rb', line 9 def auto_announce_interval @auto_announce_interval end |
#ca ⇒ Object
service SSL specific configuration Cert is supposed to be PKCS12
13 14 15 |
# File 'lib/grenache/configurable.rb', line 13 def ca @ca end |
#cert_pem ⇒ Object
service SSL specific configuration Cert is supposed to be PKCS12
13 14 15 |
# File 'lib/grenache/configurable.rb', line 13 def cert_pem @cert_pem end |
#grape_address ⇒ Object
grape configuration
6 7 8 |
# File 'lib/grenache/configurable.rb', line 6 def grape_address @grape_address end |
#key ⇒ Object
service SSL specific configuration Cert is supposed to be PKCS12
13 14 15 |
# File 'lib/grenache/configurable.rb', line 13 def key @key end |
#reject_unauthorized ⇒ Object
service SSL specific configuration Cert is supposed to be PKCS12
13 14 15 |
# File 'lib/grenache/configurable.rb', line 13 def end |
#service_host ⇒ Object
service configuration parameters
9 10 11 |
# File 'lib/grenache/configurable.rb', line 9 def service_host @service_host end |
#service_timeout ⇒ Object
service configuration parameters
9 10 11 |
# File 'lib/grenache/configurable.rb', line 9 def service_timeout @service_timeout end |
#timeout ⇒ Object
grape configuration
6 7 8 |
# File 'lib/grenache/configurable.rb', line 6 def timeout @timeout end |
#verify_mode ⇒ Object
service SSL specific configuration Cert is supposed to be PKCS12
13 14 15 |
# File 'lib/grenache/configurable.rb', line 13 def verify_mode @verify_mode end |