Class: HaproxyParser::Builders::Frontend
- Defined in:
- lib/haproxy_parser/builders/frontend.rb
Instance Attribute Summary collapse
-
#backend ⇒ Object
Returns the value of attribute backend.
Attributes inherited from Base
Instance Method Summary collapse
- #backend_name ⇒ Object
-
#initialize(section:, default: nil, backend: nil) ⇒ Frontend
constructor
A new instance of Frontend.
- #ipaddress ⇒ Object
- #mode ⇒ Object
- #port ⇒ Object
- #ssl ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(section:, default: nil, backend: nil) ⇒ Frontend
Returns a new instance of Frontend.
7 8 9 10 |
# File 'lib/haproxy_parser/builders/frontend.rb', line 7 def initialize(section:, default: nil, backend: nil) super(section: section, default: default) @backend = backend end |
Instance Attribute Details
#backend ⇒ Object
Returns the value of attribute backend.
6 7 8 |
# File 'lib/haproxy_parser/builders/frontend.rb', line 6 def backend @backend end |
Instance Method Details
#backend_name ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/haproxy_parser/builders/frontend.rb', line 12 def backend_name @backend_name ||= if dig_data("use_backend") dig_data("use_backend") else dig_data("default_backend") end end |
#ipaddress ⇒ Object
20 21 22 |
# File 'lib/haproxy_parser/builders/frontend.rb', line 20 def ipaddress @ipaddress ||= bind_parser.ipaddress end |
#mode ⇒ Object
32 33 34 |
# File 'lib/haproxy_parser/builders/frontend.rb', line 32 def mode @mode ||= dig_data("mode") end |
#port ⇒ Object
24 25 26 |
# File 'lib/haproxy_parser/builders/frontend.rb', line 24 def port @port ||= bind_parser.port end |
#ssl ⇒ Object
28 29 30 |
# File 'lib/haproxy_parser/builders/frontend.rb', line 28 def ssl @ssl ||= bind_parser.ssl end |