Class: Services::Endpoint

Inherits:
Entity
  • Object
show all
Defined in:
lib/services/endpoint.rb

Overview

endpoint describes a VIP ip

Instance Attribute Summary collapse

Attributes inherited from Entity

#name, #path

Instance Method Summary collapse

Methods inherited from Entity

#load, #store, #to_hash

Constructor Details

#initialize(name, args = {}) ⇒ Endpoint

Returns a new instance of Endpoint.



10
11
12
13
14
15
16
# File 'lib/services/endpoint.rb', line 10

def initialize(name, args = {})
  @ip    = args[:ip] || ''
  @proto = args[:proto] || 'http'
  @port  = args[:port]  || 80
  @path  = "#{name}/endpoint"
  super
end

Instance Attribute Details

#ipObject

Returns the value of attribute ip.



9
10
11
# File 'lib/services/endpoint.rb', line 9

def ip
  @ip
end

#portObject

Returns the value of attribute port.



9
10
11
# File 'lib/services/endpoint.rb', line 9

def port
  @port
end

#protoObject

Returns the value of attribute proto.



9
10
11
# File 'lib/services/endpoint.rb', line 9

def proto
  @proto
end