class ManageIQ::PostgresHaAdmin::ConfigHandler

Public Instance Methods

after_failover(&block) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# File lib/manageiq/postgres_ha_admin/config_handler.rb, line 30
def do_after_failover(new_primary_conn_info)
  @after_failover_cb&.call(new_primary_conn_info)
end
do_before_failover() click to toggle source
# File lib/manageiq/postgres_ha_admin/config_handler.rb, line 26
def do_before_failover
  @before_failover_cb&.call
end
name() click to toggle source
# File lib/manageiq/postgres_ha_admin/config_handler.rb, line 4
def name
  "Config Handler"
end
read() click to toggle source
# File lib/manageiq/postgres_ha_admin/config_handler.rb, line 8
def read
  raise NotImplementedError
end
write(_conninfo) click to toggle source
# File lib/manageiq/postgres_ha_admin/config_handler.rb, line 12
def write(_conninfo)
  raise NotImplementedError
end