class DeadmanCheck::DeadmanCheckGlobal

Public Instance Methods

configure_diplomat(host, port, consul_token) click to toggle source
# File lib/deadman_check_global.rb, line 12
def configure_diplomat(host, port, consul_token)
  Diplomat.configure do |config|
    config.url = "http://#{host}:#{port}"
    if consul_token != ""
        config.options = {headers: {"X-Consul-Token" => consul_token}}
    end
  end
end
get_epoch_time() click to toggle source
# File lib/deadman_check_global.rb, line 7
def get_epoch_time
  epoch_time_now = Time.now.to_i
  return epoch_time_now
end