module Mmtrix::Control::ServerMethods

Contains methods that deal with connecting to the server

Public Instance Methods

api_server() click to toggle source

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

# File lib/mmtrix/control/server_methods.rb, line 21
def api_server
  @api_server ||= Mmtrix::Control::Server.new(Agent.config[:api_host], Agent.config[:api_port])
end
server() click to toggle source
# File lib/mmtrix/control/server_methods.rb, line 15
def server
  @remote_server ||= server_from_host(nil)
end
server_from_host(hostname=nil) click to toggle source
# File lib/mmtrix/control/server_methods.rb, line 25
def server_from_host(hostname=nil)
  Mmtrix::Control::Server.new(hostname || Agent.config[:host], Agent.config[:port])
end