Class: Kumonos::Envoy::Cluster
- Inherits:
-
Struct
- Object
- Struct
- Kumonos::Envoy::Cluster
- Defined in:
- lib/kumonos/envoy.rb
Instance Attribute Summary collapse
-
#connect_timeout_ms ⇒ Object
Returns the value of attribute connect_timeout_ms.
-
#hosts ⇒ Object
Returns the value of attribute hosts.
-
#lb_type ⇒ Object
Returns the value of attribute lb_type.
-
#name ⇒ Object
Returns the value of attribute name.
-
#tls ⇒ Object
Returns the value of attribute tls.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#connect_timeout_ms ⇒ Object
Returns the value of attribute connect_timeout_ms
89 90 91 |
# File 'lib/kumonos/envoy.rb', line 89 def connect_timeout_ms @connect_timeout_ms end |
#hosts ⇒ Object
Returns the value of attribute hosts
89 90 91 |
# File 'lib/kumonos/envoy.rb', line 89 def hosts @hosts end |
#lb_type ⇒ Object
Returns the value of attribute lb_type
89 90 91 |
# File 'lib/kumonos/envoy.rb', line 89 def lb_type @lb_type end |
#name ⇒ Object
Returns the value of attribute name
89 90 91 |
# File 'lib/kumonos/envoy.rb', line 89 def name @name end |
#tls ⇒ Object
Returns the value of attribute tls
89 90 91 |
# File 'lib/kumonos/envoy.rb', line 89 def tls @tls end |
#type ⇒ Object
Returns the value of attribute type
89 90 91 |
# File 'lib/kumonos/envoy.rb', line 89 def type @type end |
Class Method Details
.build(h) ⇒ Object
91 92 93 |
# File 'lib/kumonos/envoy.rb', line 91 def build(h) new(h.fetch('name'), h.fetch('type'), h.fetch('tls'), h.fetch('connect_timeout_ms'), h.fetch('lb_type'), h.fetch('hosts')) end |
Instance Method Details
#to_h ⇒ Object
96 97 98 99 100 101 102 103 104 |
# File 'lib/kumonos/envoy.rb', line 96 def to_h h = super if tls cluster[:ssl_context] = {} else h.delete(:tls) end h end |