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. Runners (Process, Server, and Service) create a proxy instance via ProxyFactory based on ‘service.proxy.kind`.
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
-
‘host` / `port`: endpoint clients should connect to when the proxy is enabled
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.
21 22 23 |
# File 'lib/nonnative/proxy.rb', line 21 def initialize(service) @service = service end |