Class: HAProxyCluster::Server
Defined Under Namespace
Classes: Timeout
Constant Summary
collapse
- TYPE_ID =
2
Instance Attribute Summary collapse
#stats
Instance Method Summary
collapse
#method_missing, #monitor
Constructor Details
#initialize(stats, member = nil) ⇒ Server
Returns a new instance of Server.
8
9
10
11
|
# File 'lib/haproxy_cluster/server.rb', line 8
def initialize(stats,member = nil)
@member = member
super stats
end
|
Instance Attribute Details
#member ⇒ Object
Returns the value of attribute member.
12
13
14
|
# File 'lib/haproxy_cluster/server.rb', line 12
def member
@member
end
|
Instance Method Details
#backup? ⇒ Boolean
18
19
20
|
# File 'lib/haproxy_cluster/server.rb', line 18
def backup?
self.bck == 1
end
|
#disable! ⇒ Object
30
31
32
|
# File 'lib/haproxy_cluster/server.rb', line 30
def disable!
modify! :disable
end
|
#enable! ⇒ Object
26
27
28
|
# File 'lib/haproxy_cluster/server.rb', line 26
def enable!
modify! :enable
end
|
#name ⇒ Object
14
15
16
|
# File 'lib/haproxy_cluster/server.rb', line 14
def name
self.svname
end
|
#ok? ⇒ Boolean
22
23
24
|
# File 'lib/haproxy_cluster/server.rb', line 22
def ok?
self.status == 'UP'
end
|