Class: Entrance::Agent::Service
- Extended by:
- Globalizer
- Defined in:
- lib/entrance/agent/service.rb
Instance Attribute Summary collapse
-
#acl ⇒ Object
Returns the value of attribute acl.
-
#application_id ⇒ Object
Returns the value of attribute application_id.
-
#backend ⇒ Object
Returns the value of attribute backend.
-
#name ⇒ Object
Returns the value of attribute name.
-
#url ⇒ Object
Returns the value of attribute url.
-
#zk_path ⇒ Object
Returns the value of attribute zk_path.
Attributes included from Globalizer
Attributes inherited from Restful
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Service
constructor
A new instance of Service.
Methods inherited from Restful
Constructor Details
#initialize(params = {}) ⇒ Service
Returns a new instance of Service.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/entrance/agent/service.rb', line 11 def initialize params={} super params.merge(load:true) backend_params = { mode: :http, enable_frontend: false, port: 0, path: zk_path, application: name, uri: Config.current.health_url } @backend = Synapse::Easy::Service.new backend_params acl_params = { as_digest: true, url: url, backend: backend } @acl = Acl::UrlBackendRouter.new acl_params backend.application = acl.label backend.name = acl.label end |
Instance Attribute Details
#acl ⇒ Object
Returns the value of attribute acl.
10 11 12 |
# File 'lib/entrance/agent/service.rb', line 10 def acl @acl end |
#application_id ⇒ Object
Returns the value of attribute application_id.
10 11 12 |
# File 'lib/entrance/agent/service.rb', line 10 def application_id @application_id end |
#backend ⇒ Object
Returns the value of attribute backend.
10 11 12 |
# File 'lib/entrance/agent/service.rb', line 10 def backend @backend end |
#name ⇒ Object
Returns the value of attribute name.
10 11 12 |
# File 'lib/entrance/agent/service.rb', line 10 def name @name end |
#url ⇒ Object
Returns the value of attribute url.
10 11 12 |
# File 'lib/entrance/agent/service.rb', line 10 def url @url end |
#zk_path ⇒ Object
Returns the value of attribute zk_path.
10 11 12 |
# File 'lib/entrance/agent/service.rb', line 10 def zk_path @zk_path end |