Class: RhaproxyDefaults

Inherits:
Object
  • Object
show all
Includes:
RhaproxyKeywords
Defined in:
lib/rhaproxy/defaults.rb

Overview

A “defaults” section sets default parameters for all other sections following its declaration. Those default parameters are reset by the next “defaults” section. See below for the list of parameters which can be set in a “defaults” section. The name is optional but its use is encouraged for better readability.

Instance Method Summary collapse

Methods included from RhaproxyKeywords

#acl, #appsession, #backlog, #balance, #bind, #bind_process, #block, #capture_cookie, #capture_request_header, #capture_response_header, #config, #cookie, #default_backend, #default_server, #description, #disabled, #dispatch, #enabled, #errorfile, #errorloc, #errorloc302, #errorloc303, #force_persist, #fullconn, #grace, #hash_type, #http_check_disable_on_404, #http_check_expect, #http_check_send_state, #http_request, #ignore_persist, #log, #maxconn, #mode, #monitor_fail, #monitor_net, #monitor_uri, #option_abortonclose, #option_accept_invalid_http_request, #option_accept_invalid_http_response, #option_allbackups, #option_checkcache, #option_clitcpka, #option_contstats, #option_dontlog_normal, #option_dontlognull, #option_forceclose, #option_forwardfor, #option_http_pretend_keepalive, #option_http_proxy, #option_http_server_close, #option_http_use_proxy_header, #option_httpchk, #option_httpclose, #option_httplog, #option_ignore_persist, #option_independant_streams, #option_ldap_check, #option_log_health_checks, #option_log_separate_errors, #option_logasap, #option_mysql_check, #option_nolinger, #option_originalto, #option_persist, #option_redispatch, #option_smtpchk, #option_socket_stats, #option_splice_auto, #option_splice_request, #option_splice_response, #option_srvtcpka, #option_ssl_hello_chk, #option_tcp_smart_accept, #option_tcp_smart_connect, #option_tcpka, #option_tcplog, #option_transparent, #persist_rdp_cookie, #persistent_id, #rate_limit_sessions, #redirect, #reqadd, #reqallow, #reqdel, #reqdeny, #reqiallow, #reqidel, #reqideny, #reqipass, #reqirep, #reqisetbe, #reqitarpit, #reqpass, #reqrep, #reqsetbe, #reqtarpit, #retries, #rspadd, #rspdel, #rspdeny, #rspidel, #rspideny, #rspirep, #rsprep, #server, #source, #stats_admin, #stats_auth, #stats_enable, #stats_hide_version, #stats_http_request, #stats_realm, #stats_refresh, #stats_scope, #stats_show_desc, #stats_show_legends, #stats_show_node, #stats_uri, #stick_match, #stick_on, #stick_store_request, #stick_store_response, #stick_table, #tcp_request_connection, #tcp_request_content, #tcp_request_inspect_delay, #tcp_response_content, #tcp_response_inspect_delay, #timeout_check, #timeout_client, #timeout_connect, #timeout_http_keep_alive, #timeout_http_request, #timeout_queue, #timeout_server, #timeout_tarpit, #use_backend

Constructor Details

#initializeRhaproxyDefaults

Returns a new RhaproxyDefaults Object



77
78
79
80
81
82
# File 'lib/rhaproxy/defaults.rb', line 77

def initialize()
  @conf ||= []
  @proxy_type = "defaults"
  @conf.push("  " + "#{@proxy_type} " + "\n")
  @name_index = @conf.index("  " + "#{@proxy_type} " + "\n")
end

Instance Method Details

#name(value = nil) ⇒ Object

name <name>

The defaults name is encouraged for better readability.

NOTE: This will clear the existing values in the array.


90
91
92
93
94
# File 'lib/rhaproxy/defaults.rb', line 90

def name(value = nil)
  @conf.replace( [] )
  @conf.push("  " + "#{@proxy_type} " + value.to_s + "\n")
  @name_index = @conf.index("  " + "#{@proxy_type} " + value.to_s + "\n")
end