Class: Synapse::Easy::Section::Tcp
- Defined in:
- lib/synapse/easy/section/tcp.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#default_backend ⇒ Object
Returns the value of attribute default_backend.
-
#mode ⇒ Object
Returns the value of attribute mode.
Attributes inherited from Base
#address, #name, #options, #port, #type
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Tcp
constructor
A new instance of Tcp.
- #section_options ⇒ Object
Methods inherited from Base
#bind, #each, #label, #to_synapse
Constructor Details
#initialize(params = {}) ⇒ Tcp
Returns a new instance of Tcp.
8 9 10 11 12 13 14 |
# File 'lib/synapse/easy/section/tcp.rb', line 8 def initialize params={} super @type = "frontend" @mode = params[:mode] @mode ||= :tcp @default_backend = params[:default_backend] end |
Instance Attribute Details
#default_backend ⇒ Object
Returns the value of attribute default_backend.
7 8 9 |
# File 'lib/synapse/easy/section/tcp.rb', line 7 def default_backend @default_backend end |
#mode ⇒ Object
Returns the value of attribute mode.
7 8 9 |
# File 'lib/synapse/easy/section/tcp.rb', line 7 def mode @mode end |
Instance Method Details
#section_options ⇒ Object
15 16 17 18 19 20 |
# File 'lib/synapse/easy/section/tcp.rb', line 15 def @options + [ "mode #{mode}", "bind #{bind}", ].compact end |