class Marathon::MarathonInstance
Represents an instance of Marathon
Attributes
connection[R]
Public Class Methods
new(url, options)
click to toggle source
# File lib/marathon.rb, line 39 def initialize(url, options) @connection = Connection.new(url, options) end
Public Instance Methods
apps()
click to toggle source
# File lib/marathon.rb, line 61 def apps Marathon::Apps.new(self) end
deployments()
click to toggle source
# File lib/marathon.rb, line 69 def deployments Marathon::Deployments.new(self) end
event_subscriptions()
click to toggle source
# File lib/marathon.rb, line 85 def event_subscriptions Marathon::EventSubscriptions.new(self) end
groups()
click to toggle source
# File lib/marathon.rb, line 65 def groups Marathon::Groups.new(self) end
info()
click to toggle source
Get information about the marathon server
# File lib/marathon.rb, line 53 def info connection.get('/v2/info') end
leaders()
click to toggle source
# File lib/marathon.rb, line 81 def leaders Marathon::Leader.new(self) end
metrics()
click to toggle source
# File lib/marathon.rb, line 57 def metrics connection.get('/metrics') end
ping()
click to toggle source
# File lib/marathon.rb, line 43 def ping begin connection.get('/ping') rescue Marathon::Error::UnexpectedResponseError => err return err.response.body if err.response.code == 200 raise err end end
queues()
click to toggle source
# File lib/marathon.rb, line 77 def queues Marathon::Queues.new(self) end
tasks()
click to toggle source
# File lib/marathon.rb, line 73 def tasks Marathon::Tasks.new(self) end