Class: Dendrite::Generators::Nerve::ServiceConfig
- Inherits:
-
Struct
- Object
- Struct
- Dendrite::Generators::Nerve::ServiceConfig
- Extended by:
- Forwardable
- Defined in:
- lib/dendrite/generators/nerve.rb
Instance Attribute Summary collapse
-
#service ⇒ Object
Returns the value of attribute service.
Instance Method Summary collapse
- #check_config ⇒ Object
- #read_only ⇒ Object
- #read_write ⇒ Object
- #to_h ⇒ Object
- #zookeeper_config ⇒ Object
Instance Attribute Details
#service ⇒ Object
Returns the value of attribute service
35 36 37 |
# File 'lib/dendrite/generators/nerve.rb', line 35 def service @service end |
Instance Method Details
#check_config ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/dendrite/generators/nerve.rb', line 60 def check_config return {} if not (service.service_port && service.telemetry && service.telemetry.health_url) { check_interval: Dendrite::Config.default_check_time, checks: [{ type: "http", host: Dendrite::Config.public_ip, port: service.service_port, uri: service.telemetry.health_url, rise: 3, fall: 2 }] } end |
#read_only ⇒ Object
41 42 43 |
# File 'lib/dendrite/generators/nerve.rb', line 41 def read_only service. && service..read_only end |
#read_write ⇒ Object
45 46 47 |
# File 'lib/dendrite/generators/nerve.rb', line 45 def read_write read_only && service..write_only end |