Class: Marathon::MarathonInstance

Inherits:
Object
  • Object
show all
Defined in:
lib/marathon.rb

Overview

Represents an instance of Marathon

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, options) ⇒ MarathonInstance

Returns a new instance of MarathonInstance.



39
40
41
# File 'lib/marathon.rb', line 39

def initialize(url, options)
  @connection = Connection.new(url, options)
end

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



37
38
39
# File 'lib/marathon.rb', line 37

def connection
  @connection
end

Instance Method Details

#appsObject



56
57
58
# File 'lib/marathon.rb', line 56

def apps
  Marathon::Apps.new(self)
end

#deploymentsObject



64
65
66
# File 'lib/marathon.rb', line 64

def deployments
  Marathon::Deployments.new(self)
end

#event_subscriptionsObject



80
81
82
# File 'lib/marathon.rb', line 80

def event_subscriptions
  Marathon::EventSubscriptions.new(self)
end

#groupsObject



60
61
62
# File 'lib/marathon.rb', line 60

def groups
  Marathon::Groups.new(self)
end

#infoObject

Get information about the marathon server



48
49
50
# File 'lib/marathon.rb', line 48

def info
  connection.get('/v2/info')
end

#leadersObject



76
77
78
# File 'lib/marathon.rb', line 76

def leaders
  Marathon::Leader.new(self)
end

#metricsObject



52
53
54
# File 'lib/marathon.rb', line 52

def metrics
  connection.get('/metrics')
end

#pingObject



43
44
45
# File 'lib/marathon.rb', line 43

def ping
  connection.get('/ping')
end

#queuesObject



72
73
74
# File 'lib/marathon.rb', line 72

def queues
  Marathon::Queues.new(self)
end

#tasksObject



68
69
70
# File 'lib/marathon.rb', line 68

def tasks
  Marathon::Tasks.new(self)
end