Class: MintPress::HAProxy::BackendServer

Inherits:
Object
  • Object
show all
Includes:
Mixins::Properties
Defined in:
src/haproxy/lib/haproxy/config.rb

Overview

A single server entry within a backend stanza.

Properties (Read/Write)

  • #name ⇒ String
    'Unique name for this server within its backend, used as the HAProxy server label'

    Property Attributes
    • requiredtrue
    
    
    19
    # File 'src/haproxy/lib/haproxy/config.rb', line 19
    
    property :name, type: String, required: true, description: 'Unique name for this server within its backend, used as the HAProxy server label'
  • #address ⇒ String
    'IP address or hostname of the backend server'

    Property Attributes
    • requiredtrue
    
    
    20
    # File 'src/haproxy/lib/haproxy/config.rb', line 20
    
    property :address, type: String, required: true, description: 'IP address or hostname of the backend server'
  • #port ⇒ Integer
    'TCP port the backend server listens on'

    Property Attributes
    • requiredtrue
    
    
    21
    # File 'src/haproxy/lib/haproxy/config.rb', line 21
    
    property :port, type: Integer, required: true, description: 'TCP port the backend server listens on'
  • #check ⇒ [TrueClass, FalseClass] (Default Value: true)
    'Whether HAProxy should perform health checks against this server'

    Property Attributes
    • defaulttrue
    
    
    22
    # File 'src/haproxy/lib/haproxy/config.rb', line 22
    
    property :check, type: [TrueClass, FalseClass], default: true, description: 'Whether HAProxy should perform health checks against this server'
  • #weight ⇒ Integer
    'Relative weight for load balancing; higher values receive more connections'

    Property Attributes
    
    
    23
    # File 'src/haproxy/lib/haproxy/config.rb', line 23
    
    property :weight, type: Integer, description: 'Relative weight for load balancing; higher values receive more connections'
  • #inter ⇒ Integer
    'Health check interval in milliseconds'

    Property Attributes
    
    
    24
    # File 'src/haproxy/lib/haproxy/config.rb', line 24
    
    property :inter, type: Integer, description: 'Health check interval in milliseconds'
  • #rise ⇒ Integer
    'Number of consecutive successful checks before marking the server as up'

    Property Attributes
    
    
    25
    # File 'src/haproxy/lib/haproxy/config.rb', line 25
    
    property :rise, type: Integer, description: 'Number of consecutive successful checks before marking the server as up'
  • #fall ⇒ Integer
    'Number of consecutive failed checks before marking the server as down'

    Property Attributes
    
    
    26
    # File 'src/haproxy/lib/haproxy/config.rb', line 26
    
    property :fall, type: Integer, description: 'Number of consecutive failed checks before marking the server as down'
  • #maxconn ⇒ Integer
    'Maximum number of concurrent connections to this server'

    Property Attributes
    
    
    27
    # File 'src/haproxy/lib/haproxy/config.rb', line 27
    
    property :maxconn, type: Integer, description: 'Maximum number of concurrent connections to this server'
  • #options ⇒ Array (Default Value: [])
    'Additional server-line flags appended verbatim, e.g. ["inter 2000", "rise 2"]'

    Property Attributes
    • default[]
    
    
    28
    # File 'src/haproxy/lib/haproxy/config.rb', line 28
    
    property :options, type: Array, default: [], description: 'Additional server-line flags appended verbatim, e.g. ["inter 2000", "rise 2"]'
  • #harvested_status ⇒ String
    'Live health status populated by Installation#harvest (UP, DOWN, MAINT, NOLB, no check); nil until harvested'

    Property Attributes
    
    
    29
    # File 'src/haproxy/lib/haproxy/config.rb', line 29
    
    property :harvested_status, type: String, description: 'Live health status populated by Installation#harvest (UP, DOWN, MAINT, NOLB, no check); nil until harvested'

Properties (Read Only)

Constant Summary

Constants included from MintLogger

MintLogger::DEBUG, MintLogger::ERROR, MintLogger::FATAL, MintLogger::INFO, MintLogger::UNKNOWN, MintLogger::VERBOSE, MintLogger::WARN

Instance Attribute Summary

Attributes included from Mixins::Properties

#autopush_set_cache, #dynamic_create, #harvest_on_access, #harvest_undefined_only, #harvested, #tree_root

Instance Method Summary collapse

Methods included from Mixins::Properties

#[], #[]=, #add_validate_report_result, #armour_set_property, #array_contains?, #array_is_a?, #check_autopush, #check_stack_overflow, #clone_property_object, #cloner_handle_single_property, #coerce_single, #contains_as_string?, #display_validate_report_result, #double_initialize?, #dump_to_hash, #find_parent, #find_parent_by_identity, #generate_accessor_functions, #get_canonical_renamed, #get_from_opts, #get_my_name, #get_property, #get_property_item, #has?, included, #initialize_validate_report, #inspect, #is_cloned_object?, #is_mintpress_object?, #is_probably_canonical?, #is_set?, #local_debug, #local_info, #local_verbose, #mintpress_property_definitions, #place_object_by_identity, #process_properties, #prop_set?, #property, #property_definitions, #property_details, #property_is_simple_object?, #push_root!, #require_property, #require_update, #retrieve_docstring, #sanitize, #set_map_dirty, #set_property, #set_property_item, #show_short_array, #strip_defaults!, #synchronize, #uncloned_property_definitions, #update_map, #validate, #validate_generic, #validate_properties, #validate_property, #validate_required, #version_allowed?, #weakref

Methods included from MintLogger::Utils::Common

#boolean_val, #has_value?, #no_value?, #nvl, #path_as_symbol, #ruby_level_to_send

Constructor Details

#initialize(opts = {}) ⇒ BackendServer

Returns a new instance of BackendServer.

Instance Method Details

#to_config_lineObject