Class: Nonnative::ProxyFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/nonnative/proxy_factory.rb

Overview

Factory for creating proxy instances for runners.

Each runtime runner (Process, Server, Service) constructs a proxy via this factory. The proxy implementation is selected by service.proxy.kind and resolved using proxy.

If the kind is unknown (or ‘“none”`), proxy returns NoProxy.

Class Method Summary collapse

Class Method Details

.create(service) ⇒ Nonnative::Proxy

Creates a proxy instance for the given runner configuration.

Parameters:

Returns:



22
23
24
25
26
# File 'lib/nonnative/proxy_factory.rb', line 22

def create(service)
  proxy = Nonnative.proxy(service.proxy.kind)

  proxy.new(service)
end