Class: Nonnative::NoProxy

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

Overview

No-op proxy implementation.

This is the default proxy when service.proxy.kind is ‘“none”` (or an unknown kind is provided). It does not bind/listen or alter traffic; it simply exposes the underlying runner’s configured host and port.

Runners can always call start, stop, and reset safely on this proxy.

See Also:

Instance Method Summary collapse

Methods inherited from Proxy

#initialize

Constructor Details

This class inherits a constructor from Nonnative::Proxy

Instance Method Details

#hostString

Returns the host clients should connect to.

For Nonnative::NoProxy, this is the underlying runner configuration host.

Returns:

  • (String)


47
48
49
# File 'lib/nonnative/no_proxy.rb', line 47

def host
  service.host
end

#portInteger

Returns the port clients should connect to.

For Nonnative::NoProxy, this is the underlying runner configuration port.

Returns:

  • (Integer)


56
57
58
# File 'lib/nonnative/no_proxy.rb', line 56

def port
  service.port
end

#resetvoid

This method returns an undefined value.

Resets the proxy state.

This implementation does nothing.



38
39
40
# File 'lib/nonnative/no_proxy.rb', line 38

def reset
  # Do nothing.
end

#startvoid

This method returns an undefined value.

Starts the proxy.

This implementation does nothing.



20
21
22
# File 'lib/nonnative/no_proxy.rb', line 20

def start
  # Do nothing.
end

#stopvoid

This method returns an undefined value.

Stops the proxy.

This implementation does nothing.



29
30
31
# File 'lib/nonnative/no_proxy.rb', line 29

def stop
  # Do nothing.
end