Class: ManageIQ::PostgresHaAdmin::ConfigHandler
- Inherits:
-
Object
- Object
- ManageIQ::PostgresHaAdmin::ConfigHandler
show all
- Defined in:
- lib/manageiq/postgres_ha_admin/config_handler.rb
Instance Method Summary
collapse
Instance Method Details
#after_failover(&block) ⇒ Object
21
22
23
24
|
# File 'lib/manageiq/postgres_ha_admin/config_handler.rb', line 21
def after_failover(&block)
raise ArgumentError, "A block is required to set the after failover callback" unless block_given?
@after_failover_cb = block
end
|
#before_failover(&block) ⇒ Object
16
17
18
19
|
# File 'lib/manageiq/postgres_ha_admin/config_handler.rb', line 16
def before_failover(&block)
raise ArgumentError, "A block is required to set the before failover callback" unless block_given?
@before_failover_cb = block
end
|
#do_after_failover(new_primary_conn_info) ⇒ Object
31
32
33
|
# File 'lib/manageiq/postgres_ha_admin/config_handler.rb', line 31
def do_after_failover(new_primary_conn_info)
@after_failover_cb&.call(new_primary_conn_info)
end
|
#do_before_failover ⇒ Object
26
27
28
|
# File 'lib/manageiq/postgres_ha_admin/config_handler.rb', line 26
def do_before_failover
@before_failover_cb&.call
end
|
#name ⇒ Object
4
5
6
|
# File 'lib/manageiq/postgres_ha_admin/config_handler.rb', line 4
def name
"Config Handler"
end
|
#read ⇒ Object
8
9
10
|
# File 'lib/manageiq/postgres_ha_admin/config_handler.rb', line 8
def read
raise NotImplementedError
end
|
#write(_conninfo) ⇒ Object
12
13
14
|
# File 'lib/manageiq/postgres_ha_admin/config_handler.rb', line 12
def write(_conninfo)
raise NotImplementedError
end
|