class Locd::Agent::Proxy
An server {Locd::Agent} (HTTP only at the moment) that the proxy can route requests to.
Constants
- TO_H_NAMES
Attribute / method names that {#to_h} uses.
@return [Hamster::SortedSet<Symbol>]
Public Class Methods
default_cmd_template()
click to toggle source
@todo Document cmd_template method.
@param [type] arg_name
@todo Add name param description.
@return [return_type]
@todo Document return value.
# File lib/locd/agent/proxy.rb, line 77 def self.default_cmd_template "{bin} proxy run" end
default_write_kwds(cmd_template: self.default_cmd_template, **kwds)
click to toggle source
Calls superclass method
# File lib/locd/agent/proxy.rb, line 82 def self.default_write_kwds cmd_template: self.default_cmd_template, **kwds super( keep_alive: true, run_at_load: true, port: Locd.config[:proxy, :port], cmd_template: cmd_template, **kwds, label: self.label ) end
label_name()
click to toggle source
@return [String]
The non-namespace part of the proxy's label.
# File lib/locd/agent/proxy.rb, line 64 def self.label_name "proxy" end
Public Instance Methods
port()
click to toggle source
@return [Fixnum]
Port service runs on.
# File lib/locd/agent/proxy.rb, line 106 def port config['port'] end
url()
click to toggle source
@return [String]
The URL the agent can be reached at through the proxy.
# File lib/locd/agent/proxy.rb, line 113 def url "http://#{ label }:#{ Locd.get_port }" end