Module: NewRelic::Control::ServerMethods

Included in:
NewRelic::Control
Defined in:
lib/new_relic/control/server_methods.rb

Overview

Contains methods that deal with connecting to the server

Instance Method Summary collapse

Instance Method Details

#api_serverObject

the server we should contact for api requests, like uploading deployments and the like



20
21
22
# File 'lib/new_relic/control/server_methods.rb', line 20

def api_server
  @api_server ||= NewRelic::Control::Server.new(Agent.config[:api_host], Agent.config[:api_port])
end

#serverObject



14
15
16
# File 'lib/new_relic/control/server_methods.rb', line 14

def server
  @remote_server ||= server_from_host(nil)
end

#server_from_host(hostname = nil) ⇒ Object



24
25
26
# File 'lib/new_relic/control/server_methods.rb', line 24

def server_from_host(hostname = nil)
  NewRelic::Control::Server.new(hostname || Agent.config[:host], Agent.config[:port])
end