Class: MintPress::HAProxy::Config

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

Overview

Top-level configuration object passed to the ERB template.

Properties (Read/Write)

  • #global_config ⇒ Array (Default Value: Proc.new { [ 'log /dev/log local0', 'log /dev/log local1 notice', 'chroot /var/lib/haproxy', 'user haproxy', 'group haproxy', 'daemon' ] })
    'Verbatim lines for the global stanza; use an array to support duplicate directives such as multiple "log" entries'

    Property Attributes
    • defaultProc.new { [ 'log /dev/log local0', 'log /dev/log local1 notice', 'chroot /var/lib/haproxy', 'user haproxy', 'group haproxy', 'daemon' ] }
    
    
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    # File 'src/haproxy/lib/haproxy/config.rb', line 102
    
    property :global_config, type: Array,
    default: Proc.new {
      [
        'log /dev/log local0',
        'log /dev/log local1 notice',
        'chroot /var/lib/haproxy',
        'user haproxy',
        'group haproxy',
        'daemon'
      ]
    },
    description: 'Verbatim lines for the global stanza; use an array to support duplicate directives such as multiple "log" entries'
  • #defaults_config ⇒ Array (Default Value: Proc.new { [ 'log global', 'mode http', 'option httplog', 'option dontlognull', 'timeout connect 5000', 'timeout client 50000', 'timeout server 50000' ] })
    'Verbatim lines for the defaults stanza; applied to all frontend and backend stanzas unless overridden'

    Property Attributes
    • defaultProc.new { [ 'log global', 'mode http', 'option httplog', 'option dontlognull', 'timeout connect 5000', 'timeout client 50000', 'timeout server 50000' ] }
    
    
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    # File 'src/haproxy/lib/haproxy/config.rb', line 114
    
    property :defaults_config, type: Array,
    default: Proc.new {
      [
        'log global',
        'mode http',
        'option httplog',
        'option dontlognull',
        'timeout connect 5000',
        'timeout client  50000',
        'timeout server  50000'
      ]
    },
    description: 'Verbatim lines for the defaults stanza; applied to all frontend and backend stanzas unless overridden'
  • #frontends ⇒ Hash (Default Value: {})
    'Map of frontend_name => Frontend objects defining the listening endpoints'

    Property Attributes
    • default{}
    
    
    127
    # File 'src/haproxy/lib/haproxy/config.rb', line 127
    
    property :frontends, type: Hash, default: {}, description: 'Map of frontend_name => Frontend objects defining the listening endpoints'
  • #backends ⇒ Hash (Default Value: {})
    'Map of backend_name => Backend objects defining the server pools'

    Property Attributes
    • default{}
    
    
    128
    # File 'src/haproxy/lib/haproxy/config.rb', line 128
    
    property :backends, type: Hash, default: {}, description: 'Map of backend_name => Backend objects defining the server pools'
  • #stats ⇒ MintPress::HAProxy::Stats (Default Value: Proc.new { MintPress::HAProxy::Stats.new })
    'Stats HTTP endpoint configuration; set stats.enabled = true to activate the stats frontend stanza'

    Property Attributes
    • defaultProc.new { MintPress::HAProxy::Stats.new }
    
    
    129
    130
    131
    # File 'src/haproxy/lib/haproxy/config.rb', line 129
    
    property :stats, type: MintPress::HAProxy::Stats,
    default: Proc.new { MintPress::HAProxy::Stats.new },
    description: 'Stats HTTP endpoint configuration; set stats.enabled = true to activate the stats frontend stanza'

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 = {}) ⇒ Config

Returns a new instance of Config.