Class: Kumonos::Envoy::Listener
- Inherits:
-
Struct
- Object
- Struct
- Kumonos::Envoy::Listener
- Defined in:
- lib/kumonos/envoy.rb
Instance Attribute Summary collapse
-
#access_log_path ⇒ Object
Returns the value of attribute access_log_path.
-
#address ⇒ Object
Returns the value of attribute address.
-
#ds ⇒ Object
Returns the value of attribute ds.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#access_log_path ⇒ Object
Returns the value of attribute access_log_path
43 44 45 |
# File 'lib/kumonos/envoy.rb', line 43 def access_log_path @access_log_path end |
#address ⇒ Object
Returns the value of attribute address
43 44 45 |
# File 'lib/kumonos/envoy.rb', line 43 def address @address end |
#ds ⇒ Object
Returns the value of attribute ds
43 44 45 |
# File 'lib/kumonos/envoy.rb', line 43 def ds @ds end |
Class Method Details
.build(h, ds) ⇒ Object
45 46 47 |
# File 'lib/kumonos/envoy.rb', line 45 def build(h, ds) new(h.fetch('address'), h.fetch('access_log_path'), ds) end |
Instance Method Details
#to_h ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/kumonos/envoy.rb', line 50 def to_h h = super h.delete(:ds) h.delete(:access_log_path) h[:filters] = [ { type: 'read', name: 'http_connection_manager', config: { codec_type: 'auto', stat_prefix: 'egress_http', access_log: [{ path: access_log_path }], rds: { cluster: ds.cluster.name, route_config_name: DEFAULT_ROUTE_NAME, refresh_delay_ms: ds.refresh_delay_ms }, filters: [{ type: 'decoder', name: 'router', config: {} }] } } ] h end |