Class: Services::Member
Overview
This is a service member usually something that would be sitting behind some VIP
Instance Attribute Summary collapse
-
#ip ⇒ Object
Returns the value of attribute ip.
-
#port ⇒ Object
Returns the value of attribute port.
-
#proto ⇒ Object
Returns the value of attribute proto.
-
#service ⇒ Object
Returns the value of attribute service.
-
#weight ⇒ Object
Returns the value of attribute weight.
Attributes inherited from Entity
Instance Method Summary collapse
-
#initialize(name, args = {}) ⇒ Member
constructor
A new instance of Member.
Methods inherited from Entity
Constructor Details
#initialize(name, args = {}) ⇒ Member
Returns a new instance of Member.
8 9 10 11 12 13 14 15 16 |
# File 'lib/services/member.rb', line 8 def initialize(name, args = {}) @ip = args[:ip] || '' @proto = args[:proto] || 'http' @port = args[:port] || 80 @weight = args[:weight] || 20 @service = args[:service] @path = "#{service}/members/#{name}" super end |
Instance Attribute Details
#ip ⇒ Object
Returns the value of attribute ip.
7 8 9 |
# File 'lib/services/member.rb', line 7 def ip @ip end |
#port ⇒ Object
Returns the value of attribute port.
7 8 9 |
# File 'lib/services/member.rb', line 7 def port @port end |
#proto ⇒ Object
Returns the value of attribute proto.
7 8 9 |
# File 'lib/services/member.rb', line 7 def proto @proto end |
#service ⇒ Object
Returns the value of attribute service.
7 8 9 |
# File 'lib/services/member.rb', line 7 def service @service end |
#weight ⇒ Object
Returns the value of attribute weight.
7 8 9 |
# File 'lib/services/member.rb', line 7 def weight @weight end |