Class: Marathon::MarathonInstance
- Inherits:
-
Object
- Object
- Marathon::MarathonInstance
- Defined in:
- lib/marathon.rb
Overview
Represents an instance of Marathon
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
Instance Method Summary collapse
- #apps ⇒ Object
- #deployments ⇒ Object
- #event_subscriptions ⇒ Object
- #groups ⇒ Object
-
#info ⇒ Object
Get information about the marathon server.
-
#initialize(url, options) ⇒ MarathonInstance
constructor
A new instance of MarathonInstance.
- #leaders ⇒ Object
- #metrics ⇒ Object
- #ping ⇒ Object
- #queues ⇒ Object
- #tasks ⇒ Object
Constructor Details
#initialize(url, options) ⇒ MarathonInstance
Returns a new instance of MarathonInstance.
39 40 41 |
# File 'lib/marathon.rb', line 39 def initialize(url, ) @connection = Connection.new(url, ) end |
Instance Attribute Details
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
37 38 39 |
# File 'lib/marathon.rb', line 37 def connection @connection end |
Instance Method Details
#deployments ⇒ Object
64 65 66 |
# File 'lib/marathon.rb', line 64 def deployments Marathon::Deployments.new(self) end |
#event_subscriptions ⇒ Object
80 81 82 |
# File 'lib/marathon.rb', line 80 def event_subscriptions Marathon::EventSubscriptions.new(self) end |
#groups ⇒ Object
60 61 62 |
# File 'lib/marathon.rb', line 60 def groups Marathon::Groups.new(self) end |
#info ⇒ Object
Get information about the marathon server
48 49 50 |
# File 'lib/marathon.rb', line 48 def info connection.get('/v2/info') end |
#leaders ⇒ Object
76 77 78 |
# File 'lib/marathon.rb', line 76 def leaders Marathon::Leader.new(self) end |
#metrics ⇒ Object
52 53 54 |
# File 'lib/marathon.rb', line 52 def metrics connection.get('/metrics') end |
#ping ⇒ Object
43 44 45 |
# File 'lib/marathon.rb', line 43 def ping connection.get('/ping') end |