Class: Nonnative::Proxy
- Inherits:
-
Object
- Object
- Nonnative::Proxy
- Defined in:
- lib/nonnative/proxy.rb
Overview
Base class for proxy implementations.
A proxy is responsible for interposing behavior between a client and a target service. Runtime services create a proxy instance via ProxyFactory based on ‘service.proxy.kind`.
Service configuration ‘host` and `port` are the client-facing endpoint. Concrete proxy methods are implementation-specific; for example FaultInjectionProxy#host and FaultInjectionProxy#port return the upstream target behind the proxy.
Concrete proxies typically implement these public methods:
-
‘start`: begin proxying (bind/listen, start threads, etc)
-
‘stop`: stop proxying and release resources
-
‘reset`: return proxy behavior to a healthy/default state
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(service) ⇒ Proxy
constructor
A new instance of Proxy.
Constructor Details
#initialize(service) ⇒ Proxy
Returns a new instance of Proxy.
23 24 25 |
# File 'lib/nonnative/proxy.rb', line 23 def initialize(service) @service = service end |