Class: Nonnative::Proxy

Inherits:
Object
  • Object
show all
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

FaultInjectionProxy, NoProxy

Instance Method Summary collapse

Constructor Details

#initialize(service) ⇒ Proxy

Returns a new instance of Proxy.

Parameters:



21
22
23
# File 'lib/nonnative/proxy.rb', line 21

def initialize(service)
  @service = service
end