Class: Nonnative::ConfigurationProxy
- Inherits:
-
Object
- Object
- Nonnative::ConfigurationProxy
- Defined in:
- lib/nonnative/configuration_proxy.rb
Overview
Proxy configuration attached to a runner configuration.
A proxy allows you to interpose behavior between a client and a real service. For example, the built-in ‘“fault_injection”` proxy can close connections, introduce delays, or corrupt data for resilience testing.
This object is created automatically for each runner via ConfigurationRunner. When kind is set to ‘“none”`, no proxy is started and the runner will use its configured host/port directly.
Instance Attribute Summary collapse
- #host ⇒ String, ...
- #kind ⇒ String, ...
- #log ⇒ String, ...
- #options ⇒ String, ...
- #port ⇒ String, ...
- #wait ⇒ String, ...
Instance Method Summary collapse
-
#initialize ⇒ void
constructor
Creates a proxy configuration with defaults.
Constructor Details
#initialize ⇒ void
Creates a proxy configuration with defaults.
Defaults:
-
kind: ‘“none”` -
host: ‘“0.0.0.0”` -
port:0 -
wait:0.1 -
options: ‘{}`
35 36 37 38 39 40 41 |
# File 'lib/nonnative/configuration_proxy.rb', line 35 def initialize self.kind = 'none' self.host = '0.0.0.0' self.port = 0 self.wait = 0.1 self. = {} end |
Instance Attribute Details
#host ⇒ String, ...
23 24 25 |
# File 'lib/nonnative/configuration_proxy.rb', line 23 def host @host end |
#kind ⇒ String, ...
23 24 25 |
# File 'lib/nonnative/configuration_proxy.rb', line 23 def kind @kind end |
#log ⇒ String, ...
23 24 25 |
# File 'lib/nonnative/configuration_proxy.rb', line 23 def log @log end |
#options ⇒ String, ...
23 24 25 |
# File 'lib/nonnative/configuration_proxy.rb', line 23 def @options end |
#port ⇒ String, ...
23 24 25 |
# File 'lib/nonnative/configuration_proxy.rb', line 23 def port @port end |
#wait ⇒ String, ...
23 24 25 |
# File 'lib/nonnative/configuration_proxy.rb', line 23 def wait @wait end |