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. 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

FaultInjectionProxy, NoProxy

Instance Method Summary collapse

Constructor Details

#initialize(service) ⇒ Proxy

Returns a new instance of Proxy.

Parameters:



23
24
25
# File 'lib/nonnative/proxy.rb', line 23

def initialize(service)
  @service = service
end